Vector and Stack Class in Java

Properties:
Vector uses a dynamic array to store the data elements. It is similar to ArrayList. However, It is synchronized. it is synchronized and due to which it gives poor performance in searching, adding, delete and update of its elements.

How to Create?
Vector<String> v=new Vector<String>();

Methods: addElement(Object element), int capacity(), int size(), firstElement(), lastElement(), get(int index) etc.

To get more details please watch below youtube video and Subscribe the channel.



No comments:

Post a Comment