Dear all, I am doing a webapplication with Oracle as backend.Earlier in a differnet applicaiton i used vector but it takes sometime to retrieve the db values . i read in internet like below
1.Vector and Arraylist are grownable or shinkable where are array is not. 2.Vector and Arraylist are implemented from List interface where as array is a primitive data type 3.Vector is Synchrnized where as arraylist is not 4.For best performance better to use arraylist than vector
You need to be very careful about what they say on the internet. ArrayList is a class which you can make objects from, but you mustn't confuse it with an array.
If you read anywhere that an array is a primitive data type in Java, that is mistaken. An array is an object in its own right. They are correct if they mean that arrays can contain primitives and ArrayLists can't (but you can put primitives into ArrayLists and have them auto-boxed into reference types). They are also correct that ArrayList implements the List<E> interface, but so does Vector.
If you read about Vector, ArrayList and List Implementations, you find out what to do to synchronise an ArrayList, and you find out that Taariq's recommendation appears to be correct.