Category Archives: Java

Chapter 39: Hashtable

Hashtable is a class in Java collections which implements Map interface and extends the Dictionary Class Contains only unique elements and its synchronized…
Continue reading

Chapter 38: Enum starting with number

Java does not allow the name of enum to start with number like 100A, 25K. In that case, we can append the code…
Continue reading

Chapter 37: EnumSet class

Java EnumSet class is the specialized Set implementation for use with enum types. It inherits AbstractSet class and implements the Set interface. Section…
Continue reading

Chapter 36: Enum Map

Java EnumMap class is the specialized Map implementation for enum keys. It inherits Enum and AbstractMap classes. the Parameters for java.util.EnumMap class. K:…
Continue reading

Chapter 35: Enums

Java enums (declared using the enum keyword) are shorthand syntax for sizable quantities of constants of a single class. Section 35.1: Declaring and…
Continue reading

Chapter 34: Dequeue Interface

A Deque is linear collection that supports element insertion and removal at both ends. The name deque is short for "double ended queue"…
Continue reading

Chapter 33: Queues and Deques

Section 33.1: The usage of the PriorityQueue //The type of the PriorityQueue is Integer.PriorityQueue<Integer>    queue    =    new    PriorityQueue<Integer>(); //The elements are added to the…
Continue reading

Chapter 32: TreeMap and TreeSet

TreeMap and TreeSet are basic Java collections added in Java 1.2. TreeMap is a mutable, ordered, Map implementation. Similarly, TreeSet is a mutable,…
Continue reading

Chapter 31: SortedMap

Introduction to sorted Map. Section 31.1: Introduction to sorted Map Keypoint: SortedMap interface extends Map. entries are maintained in an ascending key order.…
Continue reading

Chapter 30: WeakHashMap

Concepts of weak Hashmap Section 30.1: Concepts of WeakHashmap Key Points: Implementation of Map. stores only weak references to its keys. Weak References…
Continue reading