jdk/test/java/util/IdentityHashMap/ToString.java
changeset 43522 f9c6f543c4db
parent 32991 b27c76b82713
equal deleted inserted replaced
43521:60e247b8d9a4 43522:f9c6f543c4db
    30 
    30 
    31 import java.util.*;
    31 import java.util.*;
    32 
    32 
    33 public class ToString {
    33 public class ToString {
    34     public static void main(String[] args) {
    34     public static void main(String[] args) {
    35         Map<String, String> m = new IdentityHashMap<String, String>();
    35         Map<String, String> m = new IdentityHashMap<>();
    36         Set<Map.Entry<String, String>> es = m.entrySet();
    36         Set<Map.Entry<String, String>> es = m.entrySet();
    37         m.put("beer", "good");
    37         m.put("beer", "good");
    38         Iterator<Map.Entry<String, String>> i = es.iterator();
    38         Iterator<Map.Entry<String, String>> i = es.iterator();
    39         System.out.println(i); // Used to throw exception
    39         System.out.println(i); // Used to throw exception
    40         i.next();
    40         i.next();