Exemple #1
0
 // Producing a Collection of the values:
 public static void printValues(Map m) {
   System.out.print("Values: ");
   Collection1.print(m.values());
 }
Exemple #2
0
 // Producing a Set of the keys:
 public static void printKeys(Map m) {
   System.out.print("Size = " + m.size() + ", ");
   System.out.print("keys: ");
   Collection1.print(m.keySet());
 }