只翻译下面的一段话就行,特别是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();

解决方案 »

  1.   

    其实意思很简单,从一个定义了泛型的collection中读取数据,不需要进行类型转换
      

  2.   

    一个从特定类型的集合中检索到的值不需要做类型转换,在这个例子中,一个URL检索出来不需要做明确的类型转换就可以使用。
    大体上就是这个意思了