Posts tagged with #java-fundamentals

Abstract Classes in Java: Interfaces and Composition

Compare Java interfaces, abstract classes, and composition, then see when shared state, default methods, or sealed types change the design choice.

Arithmetic Operators in Java: Division, Overflow, Promotion

Compare Java arithmetic with runnable examples of division, negative remainders, overflow, type promotion, and BigDecimal for decimal money.

Java Array Basics: Length, Bounds, Copies, and Resizing

Learn Java arrays through runtime-sized allocation, bounds checks, aliasing, copying, and the fixed length that distinguishes them from ArrayList.

ArrayList in Java

Compare ArrayList's Java SE 27 contract with OpenJDK 27 growth behavior, capacity hints, operation costs, fail-fast iterators, and bounded concurrency options.

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.