日期:2014-05-20 浏览次数:21004 次
import java.util.*;
public class Test {
public static void main(String[] args){
Set s = new HashSet();
s.add("1");
System.out.println(s);
}
}
------解决方案--------------------
楼主进入Eclipse 然后 点 window -> preferences -> java -> Errors/warnings 然后看右手边有个Generic Types 有个Usage of a raw type 将选项由error改为waring或者ignore。
该问题即可解决!