1Z0-771 study plan
1Z0-771 · Give each week a clear focus.
8 weeks · About 6 hours per week
Object-Oriented Programming: Classes, Inheritance, Interfaces, and Records
Write and compile at least 12 small classes that exercise constructors, this(), constructor chaining, static vs instance initialization order, and final fields, then predict initialization output before running each one
Implement a four-level inheritance hierarchy that overrides methods and uses covariant return types, and explain in writing which version of each method is invoked for a polymorphic reference
Build a set of examples that demonstrate abstract classes, interface default and static methods, and the diamond conflict resolution rule, and fix at least three compile errors caused by ambiguous defaults
Define a record with a compact constructor, a custom accessor, and a static factory, and contrast it with an equivalent immutable class in a short written comparison
Create a table of access modifiers across packages and subclasses and verify every cell with code that compiles or fails to compile as predicted
Your checkpoint
A single Git repository with a package-organized source tree of 25+ compiling classes plus a README that states, for each of the five goal areas, one rule you verified by experiment and one misconception you corrected
Object-Oriented Programming: Classes, Inheritance, Interfaces, and Records & Java Fundamentals and Data Types
Implement equals, hashCode, and toString contracts correctly for three classes, including one with an inheritance relationship, and write tests that show the symmetry and transitivity failures of a naive implementation
Use sealed interfaces and permits clauses with final, sealed, and non-sealed subtypes, and add a switch pattern that covers all permitted types without a default branch
Demonstrate primitive widening, narrowing casts, autoboxing and unboxing pitfalls, integer overflow, and floating-point comparison, and record the exact output of each case
Explain and verify var inference limits, including where var is illegal and how it interacts with anonymous classes and lambda parameters
Compare String, StringBuilder, and text blocks by writing code that shows immutability effects, string pool identity, and intern behavior
Your checkpoint
A written one-page cheat sheet on equality, sealed hierarchies, and primitive conversion rules, backed by a passing test class of at least 20 assertions that a reviewer can run with one command
Controlling Program Flow and Exception Handling
Write code that exercises the full try-catch-finally execution order, including return statements inside try and finally, and predict output before running it
Build a custom checked exception hierarchy with a cause chain and suppressed exceptions from try-with-resources, and print the full stack trace to confirm ordering
Implement switch statements and switch expressions over enums, strings, and integers, including yield, arrow labels, and exhaustiveness, and convert one statement form into an expression form
Use labeled break and continue plus nested loops to solve three small algorithm tasks such as matrix search and prime sieve, and refactor each to remove at least one label
Create a table of the most common runtime exceptions and trigger each one deliberately with a minimal code snippet
Your checkpoint
A runnable exception-lab project of at least 10 classes with a companion document that lists, for each scenario, the predicted output, the actual output, and the language rule that explains the difference
Generics and Collections
Write generic classes and methods with bounded type parameters, multiple bounds, and wildcards, and explain the difference between List<? extends T>, List<? super T>, and List using a written use-site rule
Demonstrate type erasure by showing what bridge methods do and why instanceof List is illegal, and list three operations that generics forbid at runtime
Choose correctly among ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap, ArrayDeque, and PriorityQueue for six described scenarios, and justify each choice with complexity reasoning
Implement a class with correct equals and hashCode used as a HashMap key, then break it deliberately and observe duplicate-key behavior
Use Comparable and Comparator, including thenComparing and reversed, to sort a collection three different ways
Your checkpoint
A collections decision guide covering at least eight collection types with big-O notes for add, get, and contains, plus a passing test suite that proves each recommendation with a measured or asserted behavior
Lambdas, Streams, and Functional Interfaces
Implement and use the core functional interfaces Predicate, Function, Supplier, Consumer, BiFunction, and UnaryOperator, including primitive specializations, and write one composed pipeline that chains at least four of them
Build a stream pipeline that uses filter, map, flatMap, distinct, sorted, peek, limit, and collect, and rewrite the same logic imperatively to compare readability
Use Collectors to produce grouping, partitioning, counting, averaging, joining, and a downstream mapping collector, and explain when teeing or a custom collector is warranted
Explain and verify lazy evaluation and short-circuiting by placing logging side effects in a stream and observing how many times they fire
Use Optional correctly at return boundaries and demonstrate three anti-patterns such as Optional fields and calling get without a check
Your checkpoint
A stream cookbook of at least 12 self-contained, runnable examples, each with a one-sentence statement of the problem, the pipeline, and the expected output, plus a short section on when to prefer a loop
Concurrency and Multithreading
Create threads with Runnable, Thread, and an ExecutorService, and shut each down cleanly, contrasting shutdown with shutdownNow and awaitTermination
Reproduce a race condition with a shared counter, then fix it with synchronized, a Lock, and an AtomicInteger, and explain the visibility guarantee each provides
Use CountDownLatch, CyclicBarrier, and a BlockingQueue in three small producer-consumer or coordination programs
Write code that uses CompletableFuture to chain, combine, and handle failures across at least three asynchronous stages
Explain and demonstrate the difference between deadlock and livelock with a minimal two-lock example, and describe one strategy that prevents each
Your checkpoint
A concurrency lab with at least five runnable programs, each showing the broken version and the fixed version, plus a written table mapping each problem to the Java mechanism that solves it and the guarantee it relies on
I/O, NIO.2, and Serialization
Read and write text and binary files with Files, Path, and buffered streams, and copy a directory tree while preserving attributes
Walk a directory with Files.walk and a FileVisitor, filter by glob or predicate, and report file counts and total size
Use Path operations including resolve, relativize, normalize, and toAbsolutePath, and predict results for at least eight tricky path pairs
Serialize and deserialize an object graph with transient fields, a custom serialVersionUID, and writeObject/readObject, and explain what happens when the class changes
Demonstrate the risks of deserialization with a filtering ObjectInputFilter, and compare serialization with a manual text format for the same data
Your checkpoint
A file-tool utility that indexes a directory tree and writes a summary report, accompanied by a test that runs against a temporary directory created with Files.createTempDirectory and cleans up afterward
Modules and the Module System & Annotations, Reflection, and Date/Time API
Create a multi-module project with module-info.java files that uses requires, exports, opens, and provides/uses with a service loader, and run it from the module path
Diagnose and fix at least three module errors such as a split package, a missing requires, and a non-exported package access, and record the exact error message for each
Declare and process a custom annotation at runtime with reflection, including retention and target choices, and read annotation values from a class and its methods
Use the Date/Time API to parse, format, and convert between LocalDate, ZonedDateTime, Instant, and Duration across a daylight-saving transition, and explain the observed offset change
Complete two timed full-length practice sets and review every missed question by writing the corrected rule in your own words
Your checkpoint
A final review dossier containing the working multi-module project, the annotation-processing example, a DST conversion write-up, and an error log of every missed practice question with its corrected rule and the domain it belongs to
Milestones
Week 2: Without notes, sketch the initialization order of a class with static blocks, instance blocks, and constructor chaining, and explain sealed type exhaustiveness in a switch; then compile a sealed hierarchy from scratch in under 15 minutes
Week 4: Score at least 80 percent on a 25-question self-made quiz covering domains 1 through 4, and correctly justify the collection choice for five new scenarios you have not seen before
Week 6: Reproduce and fix a race condition from a blank file in under 20 minutes, and explain in writing why synchronized fixes visibility as well as atomicity
Week 8: Pass a timed 50-question mixed-domain practice set at 75 percent or higher, with every incorrect answer traced to a named rule in your review dossier