Java LinkedHashMap Tutorial

Java LinkedHashMap is a hash table and doubly linked List based implementation of Java’s Map interface. It extends the HashMap class which is another very commonly used implementation of the Map interface The HashMap class doesn’t guarantee any…

Continue Reading

Stack in Java

A Stack is a Last In First Out (LIFO) data structure. It supports two basic operations called push and pop. The push operation adds an element at the top of the stack, and the pop operation…

Continue Reading

Java Priority Queue

A priority queue in Java is a special type of queue wherein all the elements are ordered as per their natural ordering or based on a custom Comparator supplied at the time of creation. The front of the…

Continue Reading

Java LinkedList Tutorial

Java LinkedList is a doubly linked list implementation of Java’s List and Deque interfaces. It is part of Java’s collections framework. Here is the class hierarchy of LinkedList Following are some key…

Continue Reading

Vector vs ArrayList in Java

ArrayList and Vectors both implement the List interface and both use (dynamically resizable) arrays for its internal data structure, much like using an ordinary array.Syntax: ArrayList<T> al = new ArrayList<T>(); Vector<T> v…

Continue Reading

ArrayList in Java

ArrayList is a part of collection framework and is present in java.util package. It provides us dynamic arrays in Java. Though, it may be slower than standard arrays but can be helpful…

Continue Reading