Top Categories
what is vector? Vector introduced in jdk 1.0. Vector is type of list which implement list same as array list. It is dynamic array in which you can increased size of array. vector increased size by 100%. what is difference between ArrayList and Vector? Vector : 1) when exceed array limit it will i
what is vector? Vector introduced in jdk 1.0. Vector is type of list which implement list same as array list. It is dynamic array in which you can increased size of array. vector increased size by 100%. what is difference between ArrayList and Vector? Vector : 1) when exceed array limit it will increased capacity by 100%. It waste lots of memory. 2) Vector is thread safe. 3) It is slow. ArrayList : 1) when exceed array limit it will increased capacity by 50%. It save memory. 2) ArrayList is not thread safe. 3) It is fast. For more details, watch this video.