Intermediate
Collections Framework (ArrayList, HashMap, TreeMap), Generics, functional programming (lambdas, streams, Optional), advanced OOP (enums, nested classes, Comparable), exception handling, File I/O (NIO), concurrency basics (threads, ExecutorService), and modern Java features (var, records, text blocks, sealed classes, pattern matching).
Progress: 0 / 35 topics completed
Collections Framework
ArrayList
Use ArrayList to store a resizable list of objects, and master the most common List operations.
LinkedList
Use LinkedList as both a List and a Deque for efficient insertions at both ends.
HashMap
Store key-value pairs with HashMap for fast lookup, insertion, and deletion by key.
HashSet
Store unique elements with HashSet and perform fast membership tests and set operations.
TreeMap and TreeSet
Keep keys or elements automatically sorted using TreeMap and TreeSet, backed by a red-black tree.
Collections Utility Class
Use the java.util.Collections class for sorting, searching, shuffling, and creating safe collection wrappers.
Iterator and ListIterator
Traverse and safely modify collections during iteration using Iterator and ListIterator.
Generics
Generics
Write type-safe, reusable classes and methods using generics to eliminate casting and catch errors at compile time.
Bounded Type Parameters
Restrict generic type parameters with upper bounds (extends) to access methods of the bound type.
Wildcards
Use the ? wildcard to write flexible generic methods that work with a range of parameterized types.
Functional Programming
Lambda Expressions
Write concise anonymous function expressions using Java lambdas to replace verbose anonymous class syntax.
Functional Interfaces
Use the built-in functional interfaces from java.util.function: Predicate, Function, Consumer, Supplier, and BiFunction.
Method References
Replace simple lambdas with the compact :: method reference syntax to improve readability.
Stream API
Process collections declaratively using Java Streams: create, transform, filter, and collect sequences of elements.
Optional
Use Optional<T> to represent a value that may or may not be present, eliminating null checks and NullPointerExceptions.
Advanced OOP
Enums
Define a fixed set of named constants with enum, and add fields, methods, and abstract methods to make them powerful.
Nested and Inner Classes
Define classes inside other classes: static nested classes, inner classes, local classes, and anonymous classes.
Comparable and Comparator
Define natural and custom ordering for objects using the Comparable and Comparator interfaces.
Advanced Exception Handling
Custom Exceptions
Define your own exception classes to make error handling expressive, precise, and domain-specific.
Try-With-Resources
Automatically close resources like streams and connections using the try-with-resources statement.
Multi-Catch and Exception Chaining
Catch multiple exception types in one catch block, and chain exceptions to preserve the original cause.
File I/O
Reading Files
Read text and binary files using the modern java.nio.file.Files API and classic BufferedReader.
Writing Files
Write text and binary data to files using Files.writeString, BufferedWriter, and PrintWriter.
Path and Files API
Navigate and manipulate the filesystem using java.nio.file.Path, Files, and directory operations.
Concurrency Basics
Threads and Runnable
Create and manage threads using Thread and Runnable to execute code concurrently.
Synchronization
Use synchronized, volatile, and atomic classes to safely share data between threads.
ExecutorService
Manage thread pools and execute tasks asynchronously with ExecutorService and Future.
Modern Java
var and Local Type Inference
Use the var keyword (Java 10+) for local variable type inference to reduce verbosity without sacrificing type safety.
Records
Define immutable data-carrier classes concisely with the record keyword (Java 16+).
Text Blocks
Write multi-line string literals cleanly using text blocks (Java 15+), without escape sequences and string concatenation.
instanceof Pattern Matching
Use instanceof with pattern matching (Java 16+) to eliminate redundant casts and write cleaner type checks.
Modern String Methods
Use String enhancements added in Java 11-15: isBlank, strip, lines, repeat, indent, and formatted.
Sealed Classes and Interfaces
Restrict which classes can extend or implement a type using sealed, permits, and non-sealed (Java 17+).
Date and Time API
Work with dates, times, and durations using the modern java.time API (Java 8+): LocalDate, LocalTime, LocalDateTime, and Duration.
Modern Collections API
Use factory methods List.of, Map.of, Set.of, and Map.copyOf for concise immutable collections (Java 9+).