只翻译下面的一段话就行,特别是retrived from和casted以及cast,英语差,不明白,程序不用管
A value retrieved from a type-specific collection does not need to be casted. In this example, a URL value is retrieved and used without an explicit cast. Map<String, URL> urlMap = new HashMap<String, URL>();
try {
urlMap.put("java", new URL("http://exampledepot.com"));
} catch (MalformedURLException e) {
}
String s = urlMap.get("java").getHost();
A value retrieved from a type-specific collection does not need to be casted. In this example, a URL value is retrieved and used without an explicit cast. Map<String, URL> urlMap = new HashMap<String, URL>();
try {
urlMap.put("java", new URL("http://exampledepot.com"));
} catch (MalformedURLException e) {
}
String s = urlMap.get("java").getHost();
大体上就是这个意思了