z****p 发帖数: 138 | 1 Vector test=new Vector();
new.add(3);
这两行代码有错么?
总报错,似乎不能放int类型?
谢谢 | g*****g 发帖数: 34805 | 2 It's not C++, nor C#, so you have to add(new Integer(3))
primitive type is not object, keep that in mind.
【在 z****p 的大作中提到】 : Vector test=new Vector(); : new.add(3); : 这两行代码有错么? : 总报错,似乎不能放int类型? : 谢谢
|
|