Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 6 SE are vectors obsolete?

Tags:

java

vector

package myjava;
import java.util.*;
public class Vectors {
    public static void vec() {
        Vector v = new Vector();
    }
}

I am using net beans IDE 6.9.1 and it tells me it is an "Obsolete Collection". Besides the obvious thats it's obsolete will I ever use it in Java? I was really excited about using them..

like image 642
Aaron Avatar asked Dec 21 '22 15:12

Aaron


1 Answers

Use of Vectors have been discouraged for some time now. They are replaced by ArrayList, which has more or less the same functionality (but isn't synchronised).

like image 72
MAK Avatar answered Jan 10 '23 10:01

MAK