Monday, July 30, 2012

Netbeans: vector Obselete Collection

created a vector in Netbeans when it displays the following error: "Obsolete Collection". 


And I found it very strange. So I went to investigate the Netbeans forum. And found this.

 Vector is not deprecated BUT since Java 5 you have : ArrayList.
A Vector is synchronised, an ArrayList is not. So, if you don't use threads, you should use Arraylist instead of Vector.

Java 5 API : http://java.sun.com/j2se/1.5.0/docs/api/
http://netbeans.org/images_www/v5/nb-logo2.gif
Source: http://forums.netbeans.org/post-81854.html

No comments:

Post a Comment