TreeMap and TreeSet in Java
Explore sorted key-value and unique collections: Red-Black tree internals, O(log n) operations, and when to choose tree-based maps.
Explore sorted key-value and unique collections: Red-Black tree internals, O(log n) operations, and when to choose tree-based maps.
Master Java's try-catch-finally blocks: handling exceptions, executing cleanup code, and understanding execution flow in all scenarios.
Learn Java try-with-resources for closing AutoCloseable objects during normal control flow, with examples of close order and suppressed exceptions.
Learn Java generic bounds, including Comparable<T>, multiple constraints, class-bound ordering, and how bounds affect type erasure.
Understand Java type casting: implicit vs explicit casting, widening vs narrowing conversions, and the rules Java follows for numeric type compatibility.
Learn what Java type erasure changes in bytecode, what Signature attributes preserve for reflection, and why bridge methods keep generic overrides working.
Java functional interfaces for tests, transformations, and side effects. Learn composition, primitive forms, and why Supplier does not cache results.
Explore java.util.Objects: null-safe utilities like requireNonNull, deepEquals, toString, hash, and compare for defensive Java code.
Learn java.util.Optional: the null wrapper that makes absence explicit. Master map, flatMap, filter, orElse, and common anti-patterns.
Understand Java variable scope, name visibility, and how scope differs from runtime lifetime for locals, instance fields, and static fields.