// Posts (Page 26)

Java Enums: Switches, Fields, Constructors, Serialization

Explore Java enums, exhaustive switch expressions, per-constant fields, constructor rules, custom ordering, and serialization without fragile ordinals.

Exception Best Practices: Patterns and Anti-Patterns in Java

Learn Java's checked and unchecked exception rules, preserve causes when wrapping, log failures once at the handling boundary, and return safe API errors.

For Loops in Java

Master Java for loops: traditional for loops, enhanced for-each syntax, when to use each variant, and common iteration patterns with performance considerations.

HashMap in Java

Learn how Java HashMap handles keys, collisions, resizing, and iteration, with expected performance, concurrency limits, and JDK-specific internals.

HashSet in Java

Learn how Java HashSet stores unique elements, how equals and hashCode define duplicates, and what to expect from membership costs and iteration.

Inheritance in Java

Master Java inheritance: extends keyword, super, method overriding, and substitutability, with practical guidance for reliable class hierarchies.