Java Enums: Switches, Fields, Constructors, Serialization
Explore Java enums, exhaustive switch expressions, per-constant fields, constructor rules, custom ordering, and serialization without fragile ordinals.
Explore Java enums, exhaustive switch expressions, per-constant fields, constructor rules, custom ordering, and serialization without fragile ordinals.
Learn Java's checked and unchecked exception rules, preserve causes when wrapping, log failures once at the handling boundary, and return safe API errors.
Learn how Java fields model per-object and class state, receive default values, and support encapsulation without assuming a memory layout.
Master Java for loops: traditional for loops, enhanced for-each syntax, when to use each variant, and common iteration patterns with performance considerations.
Learn Java generic classes with Box and Pair examples, raw types, reflection metadata, and the limits of runtime type checks.
Learn Java generic methods with examples for type inference, explicit type witnesses, bounded parameters, and safe generic varargs.
Learn how Java HashMap handles keys, collisions, resizing, and iteration, with expected performance, concurrency limits, and JDK-specific internals.
Learn how Java HashSet stores unique elements, how equals and hashCode define duplicates, and what to expect from membership costs and iteration.
Learn Java if-else branching logic: conditional statements, else-if chains, nested conditionals, and operator precedence considerations for decision making.
Master Java inheritance: extends keyword, super, method overriding, and substitutability, with practical guidance for reliable class hierarchies.