Stack Class in Java Example

Stack class in java is one of the collection interface class which is subclass of Vector class. Stake class supports usual push and pop operations. In contrast to queue, Stack class has last-in first-out(LIFO) data structure. So item which is inserted at top will be available first. Stack class extends Vector class of List interface … Read more

Vector Class In Java

Vector class in java implements List interface of collection framework. Vector class is synchronized. If you don’t know size of array then you can use vector class as size of vector can grow and shrink as per adding and removing items. As vector class is synchronized, It will give poor performance on add, delete, update … Read more

LinkedList In Java

LinkedList class extends AbstractList class. LinkedList class implements List and Deque interfaces. LinkedList class is using doubly linked list to store elements in list. LinkedList can hold duplicate elements in list. LinkedList is non synchronized. Manipulation is faster in linkedlist as shifting is not required when new element is inserted or deleted from list. You … Read more

Java Collections Framework

What is Java Collections Framework? Java Collections Framework is group of different interfaces, classes and algorithms. In simple word, Collection means single unit of objects and framework means good architecture. It is best architecture to store group of reusable objects and manipulate them. Collection framework has many different interfaces, their sub interfaces and classes, their … Read more