Garbage collectors in Java: G1, ZGC and how to choose
Compare G1 and ZGC in Java 21: how they work, enable them, read GC logs, verify which is running, and choose the right one for Spring Boot.
Compare G1 and ZGC in Java 21: how they work, enable them, read GC logs, verify which is running, and choose the right one for Spring Boot.
Use LocalDate, ZonedDateTime, and Duration correctly: calculate dates, change timezones, handle daylight saving time, and write stable tests with Clock.
Comparing List.of, List.copyOf, and Collections.unmodifiableList: which are copies, which are just views, how they handle null, and when to use each.
Comparing types of thread pools in Java 21: fixed, cached, scheduled, work-stealing, virtual thread. How to configure ThreadPoolExecutor and use it safely in Spring Boot.
Distinguish between checked and unchecked exceptions, pick the right type, design custom exceptions with context, and avoid common anti-patterns.
Use Comparator.comparing, thenComparing, reversed and nullsLast to sort by multiple criteria, along with common mistakes.
Learn how to group and partition data using Collectors.groupingBy, partitioningBy, and downstream collectors like counting, mapping, filtering in Java 21.
Write multi-line strings more concisely with text blocks, master indentation and escape rules, and learn new String methods like formatted, stripIndent, and translateEscapes.
Understand why List<Integer> isn't List<Number>, when to use ? extends, when to use ? super, and the PECS principle through concrete examples.
How to use try-with-resources for automatic resource closing, writing your own AutoCloseable classes, understanding suppressed exceptions and common errors.
Compare HashMap, Collections.synchronizedMap, and ConcurrentHashMap on thread-safety, locking mechanisms, iterators, null handling, and performance, with examples and tests.
Understand the contract between equals() and hashCode() in Java, how to implement them correctly, and common mistakes that cause HashSet and HashMap to misbehave.
Use CompletableFuture in Java 21 to call several services in parallel, chain and combine results, handle errors and timeouts, and write tests for asynchronous code.
Use sealed classes, pattern matching for switch, and record patterns in Java 21 to replace chains of if-instanceof with shorter, compiler-verified code.
A guide to using Optional in Java correctly, with common anti-patterns and how to avoid them for clearer, safer code.
Learn the four "pillars" of Stream API in Java through practical examples with Order, Customer – from filtering data to aggregating results.
Discover what Java records solve, how to use them correctly for DTOs and value objects, and when to avoid them.
Learn about virtual threads in Java 21 through concrete examples, comparison with platform threads, and how to use them in Spring Boot.