coderz.py

Keep Coding Keep Cheering!

Deque Interface in Java

The Deque interface in java.util package is a queue interface subtype. A linear collection with the ability to insert and remove elements at both ends. Deque is an abbreviation for “double-ended queue” and is usually pronounced “deck.” It can function as either a queue (first-in-first-out/FIFO) or a stack (last-in-first-out/LIFO). Declaration: Methods of Deque interface: Method […]

September 17, 2022 | Java | No comments

Queue Interface in Java

The Queue interface extends the Collection interface and is present in java.util package is used to hold the elements about to be processed in FIFO (First In First Out) order. It is an ordered list of objects that can only be used to insert elements at the end of the list and delete elements from […]

September 16, 2022 | Java | No comments

IdentityHashMap class in Java

The HashMap class is similar to the IdentityHashMap class. The IdentityHashMap implements the Map interface using Hashtable, and when comparing keys, it uses reference-equality rather than object-equality (and values). This class is not intended to be a general-purpose Map implementation. This class is used when the user wants to compare objects by reference. It is […]

September 14, 2022 | Java | 1 comment

Java LinkedList in Collection Framework

The Collection framework is found in java.util package includes Linked List. This class is an implementation of the LinkedList data structure, a linear data structure where each element is a separate object with a data part and address part and is not kept in a single location. Pointers and addresses are used to connect the […]

July 24, 2022 | Java | No comments

Java ArrayList in Collection Framework

The java.util package contains the collection foundation component ArrayList. In Java, it offers us dynamic arrays. Although it might be slower than conventional arrays, it can be useful in programs that require a lot of array manipulation. The java.util package contains this class. Java ArrayList class Declaration: crucial things to keep in mind: Duplicate elements […]

July 23, 2022 | Java | No comments

Advertisement