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.
Master Java's try-with-resources statement for automatic cleanup of AutoCloseable objects, eliminating manual finally blocks and resource leaks.
Constrain type parameters with bounds like T extends Comparable to unlock type-specific methods in generic code.
Understand Java type casting: implicit vs explicit casting, widening vs narrowing conversions, and the rules Java follows for numeric type compatibility.
Understand how Java generics disappear at compile time, what erasure does to your types, and the implications for your code.
Master java.util.function: Predicate, Function, Supplier, Consumer, and their binary/triple variants for functional-style Java.
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.
Local, instance, and class-level variable scope in Java — where variables live, how long they persist, and what can access them.