Posts in technical

Erasure and Bridge Methods in Java

See how Java bridge methods preserve generic overrides after type erasure, inspect representative javap output, and distinguish bridges from overloads.

Java Classes and Objects: Fields, Constructors, Methods

Learn how Java classes define fields and methods, how constructors initialize objects, and how to create and use instances with the new keyword.

Java Collections Utility: Sorting, Searching, and Wrappers

Learn how java.util.Collections sorts and searches lists, how access affects operation costs, and how synchronized wrappers and unmodifiable views behave.

Java Constructors: Chaining, Object Setup, and Publication

Understand Java constructor initialization, this() delegation cycles, JVM allocation choices, and safe publication with final fields.

Custom Exceptions: Domain-Specific Error Signaling in Java

Choose Java custom exceptions for domain failures, preserve internal causes, and return stable error codes with localized safe messages at API boundaries.

Encapsulation in Java

Learn how Java encapsulation uses private fields, domain methods, validation, and defensive copies to preserve invariants and limit data exposure.

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.