Oracle Java SE 21 study plan
Oracle Java SE 21 · Give each week a clear focus.
8 weeks · About 7 hours per week
Handling Date, Time, Text, Numeric and Boolean Values & Using Object-Oriented Concepts in Java
Build and format LocalDate, LocalTime, LocalDateTime and ZonedDateTime values, converting between them and Instant
Write code that uses Period and Duration correctly and explain why one throws on LocalDate and the other does not
Format and parse dates with DateTimeFormatter patterns and localization, including custom patterns and predefined constants
Declare classes with encapsulation, inheritance, and polymorphism, and override equals, hashCode and toString consistently
Create and use interfaces, abstract classes, enums and records, and choose correctly between them for a given design
Your checkpoint
A single Java file with 20 self-written assertions (no framework) covering date arithmetic, formatting/parsing round-trips, and a small record/enum/interface hierarchy; all assertions pass.
Arrays and Collections
Declare, initialize and traverse one-dimensional and multi-dimensional arrays, including Arrays.asList, Arrays.sort with Comparator, and Arrays.equals
Select the right collection (List, Set, Map, Deque) for a scenario and justify the choice in a comment
Compare ArrayList, LinkedList, HashSet, TreeSet, HashMap and TreeMap on ordering, duplicates, and null handling
Iterate and mutate collections safely using Iterator, ListIterator, and the removeIf/forEach default methods
Use generics basics: bounded wildcards, <? extends T> vs <? super T>, and type inference in method calls
Your checkpoint
A word-frequency program that reads a hard-coded list of sentences, counts words in a TreeMap, prints the top 10 by count with ties broken alphabetically, and includes a Comparator-based sort of the entries.
Streams and Lambda Expressions
Write lambdas for the built-in functional interfaces (Function, BiFunction, Predicate, Consumer, Supplier, UnaryOperator) and use method references in all four forms
Build stream pipelines using filter, map, flatMap, distinct, sorted, peek, limit and skip
Reduce and collect results using reduce, Collectors.toList/toSet/toMap, groupingBy, partitioningBy, joining and counting, including downstream collectors
Compare Optional-returning terminal operations (findFirst, findAny, max, min) and handle empty results
Explain and demonstrate lazy evaluation, intermediate vs terminal operations, and why a stream cannot be reused
Your checkpoint
A stream-based report generator over a small in-memory list of records producing grouped, sorted, formatted output, plus a written one-paragraph explanation of stream laziness with a peek-based demonstration.
Managing Concurrent Code Execution
Create threads with Runnable and Callable, and submit work to an ExecutorService, shutting it down correctly
Synchronize shared mutable state with synchronized blocks, Lock/ReentrantLock, and atomic classes, and identify a lost-update race in given code
Use concurrent collections (ConcurrentHashMap, CopyOnWriteArrayList, BlockingQueue) and explain why they beat synchronized wrappers
Use parallel streams and ForkJoinPool while identifying when parallelism is unsafe or slower
Diagnose deadlock, starvation and visibility problems, and use volatile correctly
Your checkpoint
A producer/consumer program using a bounded BlockingQueue and an ExecutorService with a fixed thread pool that processes 1000 items with no lost updates, verified by an exact final count assertion.
Exception Handling & Controlling Program Flow
Write try/catch/finally and try-with-resources blocks, and predict output order when finally returns or throws
Distinguish checked from unchecked exceptions and create a custom exception with a cause chain
Use multi-catch and rethrow with improved type inference, and wrap exceptions without losing the original cause
Write if/else, switch statements and switch expressions with arrow labels, yield, and pattern matching for types
Write and control loops (for, enhanced for, while, do-while) including labeled break/continue, and use var correctly in local scope
Your checkpoint
A small exception-heavy utility class with 15 test cases you write yourself that assert exception type, message and cause for both success and failure paths, including a switch-expression-based calculator with a default that throws.
Using Java I/O API
Read and write text files with Files.newBufferedReader/Writer, readAllLines and lines(), and choose buffered vs unbuffered correctly
Use Path and Paths/Files for path resolution, normalization, relativization and directory traversal with Files.walk
Copy, move, delete and inspect files and directories with the Files utility methods, handling attributes and symbolic links
Serialize and deserialize objects with ObjectOutputStream/ObjectInputStream and explain serialVersionUID and transient
Use java.nio.file streams and InputStream/OutputStream with try-with-resources, and convert between byte and character streams
Your checkpoint
A command-line file tool that walks a directory tree, prints files matching a glob with size and last-modified time, and copies the matches into an output folder; run it against a self-created sample tree and capture the output.
Accessing Databases Using JDBC & Packaging and Deploying Java Code
Connect to a database with DriverManager, close resources with try-with-resources, and read connection metadata
Execute Statement and PreparedStatement queries, bind parameters safely, and process ResultSet with correct column access and null handling
Perform INSERT/UPDATE/DELETE and read generated keys, and manage transactions with setAutoCommit, commit and rollback
Organize code into packages, compile with javac -d, package with jar, and run with java -cp including a multi-release or classpath ordering scenario
Describe the module system basics: module-info.java, requires, exports, and how to run a modular jar
Your checkpoint
A packaged, runnable jar (built from a source tree with at least two packages) that connects to an embedded database, creates a table, inserts rows in a transaction, rolls one back deliberately, and prints the resulting row count.
Handling Date, Time, Text, Numeric and Boolean Values & Controlling Program Flow & Using Object-Oriented Concepts in Java & Exception Handling & Arrays and Collections & Streams and Lambda Expressions & Packaging and Deploying Java Code & Managing Concurrent Code Execution & Using Java I/O API & Accessing Databases Using JDBC
Take three full-length timed practice exams and log every missed question by domain
Re-drill the two domains with the lowest practice-exam accuracy using targeted exercises
Re-read your own notes on stream collectors, concurrency primitives and exception ordering, and re-code one example for each from memory
Practice reading unfamiliar code and predicting output under time pressure without compiling
Your checkpoint
A domain-by-domain accuracy table from three practice exams showing at least 80% overall on the final attempt, plus a one-page list of remaining weak spots.
Milestones
Week 2: Can implement a Comparator from scratch, sort a multi-field record list, and explain HashMap vs TreeMap lookup behavior without notes.
Week 4: Can write a correct producer/consumer with BlockingQueue plus a stream pipeline combining groupingBy and a downstream collector, both from a blank file in under 15 minutes.
Week 6: Scores at least 70% on a mixed 40-question practice set covering domains 1-6 and 8, with every wrong answer written up as a one-line rule.
Week 8: Scores at least 80% overall on a full-length timed practice exam and at least 70% in every individual domain.