1. 程式人生 > >新手使用Vector報錯Vector is a raw type. References to ge

新手使用Vector報錯Vector is a raw type. References to ge

str parameter 了解 不能 我不 raw reference ner 新手

照著書上抄代碼有下面一句
private Vector vector=null;
但是eclipse報錯
Vector is a raw type. References to generic type Vector<E> should be parameteriz
後來網上搜索了解決辦法,改成
private Vector<String> vector=null;
就好了,但是只能使用string類型,不能使用別的,我不太懂,有懂的大神,可以告知一下。

新手使用Vector報錯Vector is a raw type. References to ge