集合Set的定义问题
编写代码
Set<Integer> s = new Set<Integer>();
时编译出现问题。
提示:Cannot instantiate the type Set<Integer>。
网络上有人用
Set<Integer> s = new HashSet<Integer>();
代替,不会出现红色提示。
原理还不明。
--更新--
接口不能实例化
编写代码
Set<Integer> s = new Set<Integer>();
时编译出现问题。
提示:Cannot instantiate the type Set<Integer>。
网络上有人用
Set<Integer> s = new HashSet<Integer>();
代替,不会出现红色提示。
原理还不明。
--更新--
接口不能实例化