What do you think the output for lines 3 and 5 will be?
HashSet set = new HashSet();
set.add(new URL("http://google.com"));
set.contains(new URL("http://google.com"));
Thread.sleep(60000);
set.contains(new URL("http://google.com"));
很有意思!!
预知why,请看这篇文章:http://mishadoff.github.io/blog/java-magic-part-1-java-dot-net-dot-url/