programming

Linkedlist

Linked List is a part of the Collection framework present in java.util package. This class is an implementation of the LinkedList data structure which is a linear data structure where the elements are not stored in contiguous locations and every element is a separate object with a data part and address part. The elements are linked using pointers and addresses. Each element is known as a node.

Posted August 16, 2022 by Anusha ‐ 5 min read

core java programming linkedlist list collections data-structures

Vector Class

The Vector class implements a growable array of objects. Vectors fall in legacy classes, but now it is fully compatible with collections. It is found in java.util package and implement the List interface, so we can use all the methods.

Posted August 18, 2022 by Anusha ‐ 6 min read

core java programming vector class array deprecated list collections

Stack

Java Collection framework provides a Stack class that models and implements a Stack data structure. The class is based on the basic principle of last-in-first-out. In addition to the basic push and pop operations, the class provides three more functions of empty, search, and peek.

Posted August 18, 2022 by Anusha ‐ 4 min read

core java programming stack class collections

Queue Interface

The Queue interface is present in java.util package and extends the Collection interface is used to hold the elements about to be processed in FIFO(First In First Out) order. It is an ordered list of objects with its use limited to inserting elements at the end of the list and deleting elements from the start of the list, (i.e.), it follows the FIFO or the First-In-First-Out principle.

Posted August 18, 2022 by Anusha ‐ 4 min read

core java programming queue interface collections

PriorityQueue

A PriorityQueue is used when the objects are supposed to be processed based on the priority. It is known that a Queue follows the First-In-First-Out algorithm, but sometimes the elements of the queue are needed to be processed according to the priority, that’s when the PriorityQueue comes into play.

Posted August 19, 2022 by Anusha ‐ 5 min read

core java programming collections priorityqueue

Subscribe For More Content