定义:Hashtable<String, String[]> ht = new Hashtable<String, String[]>() ;
报错:The type Hashtable is not generic; it cannot be parameterized with arguments <String, String[]>
这是什么原因?怎么解决呢?谢谢
...全文
30212打赏收藏
Hashtable 定义时报错
定义:Hashtable ht = new Hashtable() ; 报错:The type Hashtable is not generic; it cannot be parameterized with arguments 这是什么原因?怎么解决呢?谢谢
[Quote=引用楼主 y11111494 的回复:]
定义:Hashtable <String, String[]> ht = new Hashtable <String, String[]>() ;
报错:The type Hashtable is not generic; it cannot be parameterized with arguments <String, String[]>
这是什么原因?怎么解决呢?谢谢
[Quote=引用楼主 y11111494 的回复:]
定义:Hashtable <String, String[]> ht = new Hashtable <String, String[]>() ;
报错:The type Hashtable is not generic; it cannot be parameterized with arguments <String, String[]>
这是什么原因?怎么解决呢?谢谢
[/Quote]
版本过低。JDK 从5.0版本支持泛型!