This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
arrays hold homogeneous objects vectors hold heterogeneous objects arraylist is like vector....in the sense it can hold heterogeneous object but the api is good than that of vector.... vectors r by default threadsafe for arraylist u hav 2 implement them ciao
Joined: Dec 10, 2001
vectors r by default threadsafe for arraylist u hav 2 implement them The Collections class provides an easy way to create a thread-safe List. This mechanism is referred to as a synchronization wrapper. To create a thread-safe List from an ArrayList, something similar to List mySynchronizedList = Collections.synchronizedList(myArrayList); should get the job done. (Note that both Vectors and Arraylists are Lists as each class implements the List interface.)