+ 2

Collection Framework ArrayList <String>=new ArrayList(10),Vector<String>=new Vector<String>(10) what is the diff???

arraylist and vector diff ...as I know vector contains synchronous methods

6th Dec 2017, 11:38 AM
Arun Kumar
Arun Kumar - avatar
4 Antworten
+ 5
A Vector defaults to doubling the size of its array, while theArrayList increases its array size by 50 percent. As the documentation says, a Vector and an ArrayList are almost equivalent. The difference is that access to a Vector is synchronized, whereas access to an ArrayList is not.
6th Dec 2017, 11:43 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 4
Please post a smaller title and add those lines of code in the question body.
6th Dec 2017, 11:40 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
Check it out Pegasus
6th Dec 2017, 11:45 AM
Arun Kumar
Arun Kumar - avatar
0
Thanks for Ur time .☺
6th Dec 2017, 12:23 PM
Arun Kumar
Arun Kumar - avatar