Vector and ArrayList in Java

Internally, both classes use array. Vector by default double the array size when array is full, while ArrayList increases the array size by 50%.

Vector is designed to be thread-safe. It puts synchronized block on each opeartion such get(int i), add(). But in most cases it's actually not thread-safe. http://stackoverflow.com/questions/1386275/why-is-java-vector-class-considered-obsolete-or-deprecated

posted on 2016-01-22 13:51  touchdown  阅读(109)  评论(0)    收藏  举报

导航