Overview of the Java Collections Framework Hierarchy
The Java Collections Framework primarily consists of two root interfaces: Collection and Map. Since Collection extends Iterable, we can consider the framework as being built upon Iterable and Map. The Collection interface defines the contract for single-column collections that store individual elements, while the Map interface defines the contr ...
Posted on Mon, 10 Aug 2026 16:34:39 +0000 by ReKoNiZe
Java Collections Framework Essentials
// Stack: Last-In-First-Out (LIFO)
// Queue: First-In-First-Out (FIFO)
// Array: Fast access, slow insertion/deletion
// Linked List: Slow access, fast insertion/deletion
// Red-Black Tree: Efficient search (binary search principle)
Collection Interface
public class CollectionDemo {
public static void main(String[] args) {
Collect ...
Posted on Fri, 17 Jul 2026 16:13:06 +0000 by havenpets
Understanding HashMap Internals: A Deep Dive into Source Code
HashMap is one of the most frequently used data structures in Java. Understanding its internal implementation helps developers make better decisions about when and how to use it effectively.
Hash Computation and Index Calculation
The quality of hash distribution directly impacts HashMap performance. The implementation applies a subtle but cruci ...
Posted on Sun, 17 May 2026 11:12:11 +0000 by st0rmer
Essential Java APIs: String Handling, Collections, Dates, and Generics
Core API Concepts
Object & String Fundamentals
By default, the toString() method in the Object class returns the memory address (hash) of the object, which is often not useful. It is standard practice to override this method to return a string representation of the object's internal state.
The == operator compares primitive types by value, ...
Posted on Fri, 15 May 2026 17:35:22 +0000 by m00nz00mer