Java SE 8 Programmer I (OCAJP 8) study plan
Java SE 8 Programmer I (OCAJP 8) · Give each week a clear focus.
8 weeks · About 7 hours per week
Java Basics & Working With Java Data Types
Compile and run Java source files from the command line using javac and java, explaining the role of the classpath and package directory layout.
Declare classes, instance variables, static variables, and local variables, then predict each variable's default value or compile error before testing it.
Write a main method in several legal and illegal signature variants and state why each one is or is not a valid entry point.
Convert between primitive types and wrapper classes, distinguishing widening from narrowing and identifying which conversions need an explicit cast.
Build a small program that uses String, StringBuilder, and primitive wrappers together, and annotate each line with the type rules it exercises.
Your checkpoint
A one-page cheat sheet of Java Basics and data type rules plus a compiling 60-line demo program that shows default values, casting, and autoboxing behavior, with predicted output written before running it.
Using Operators and Decision Constructs & Using Loop Constructs
Evaluate expressions involving operator precedence, associativity, short-circuit && and ||, and compound assignment, writing the result before executing the code.
Distinguish pre-increment from post-increment inside larger expressions and explain the resulting values step by step.
Rewrite if/else chains as switch statements and identify which argument types and case labels are legal in Java 8.
Convert between while, do-while, and for loops, and choose a loop form that guarantees at least one iteration when required.
Trace nested loops with break and labeled continue on paper, predicting the exact iteration count and final variable values.
Your checkpoint
Twenty operator and loop trace questions you author yourself, each with the code, your predicted output, the actual output, and a one-sentence rule statement for any question you got wrong.
Creating and Using Arrays & Using Loop Constructs
Declare, instantiate, and initialize one-dimensional and two-dimensional arrays using both literal and new-based syntax, including ragged arrays.
Explain the difference between an array reference, an array object, and ArrayIndexOutOfBoundsException, and demonstrate each in code.
Iterate arrays with both a classic for loop and an enhanced for loop, and state when the enhanced form cannot be used.
Use Arrays.sort, Arrays.toString, and System.arraycopy correctly, and describe what each does to the array argument.
Combine arrays with loops to compute aggregates, reverse contents in place, and search for a value without using library search methods.
Your checkpoint
A single Java file containing five array utilities (sum, max, reverse-in-place, linear search, ragged 2D print) that compiles and runs, plus a table comparing array declaration syntaxes that are legal versus illegal.
Working with Methods and Encapsulation
Write overloaded methods and predict which overload the compiler selects for a given call, including widening versus boxing versus varargs.
Apply the four access modifiers to fields, methods, and constructors, and state which callers in which packages can reach each member.
Implement encapsulation for a class by making fields private and exposing validated getters and setters, including a boolean getter naming convention.
Use static members, static methods, and static initialization blocks, and explain why a static method cannot use the this keyword.
Create constructors that chain with this(...) and explain constructor overloading versus method overloading.
Your checkpoint
A self-contained BankAccount class with private state, validated setters, overloaded deposit methods, and a static factory method, plus a driver class whose output proves each access rule you claim.
Working with Inheritance
Design a three-level class hierarchy and override methods, verifying polymorphic dispatch through a superclass reference.
Distinguish overriding from overloading and list the rules an override must satisfy regarding return type, access, and checked exceptions.
Use super to call parent constructors and methods, and explain constructor execution order in a hierarchy.
Declare abstract classes and interfaces, implement multiple interfaces in one class, and resolve a default-method conflict by overriding it.
Apply casting and instanceof to safely downcast a reference, and demonstrate the ClassCastException that occurs without a check.
Your checkpoint
A hierarchy of at least four classes and two interfaces modeling a simple payment system, with a driver that stores objects in a superclass-typed array and prints each object's overridden behavior, plus a short written justification of every override rule used.
Handling Exceptions
Classify exceptions as checked, unchecked, or errors, and state which ones the compiler forces you to handle or declare.
Write try-catch-finally blocks and predict the exact output when a catch block returns or throws and a finally block also returns.
Use try-with-resources with AutoCloseable resources and explain the order in which close methods run relative to catch and finally.
Create a custom checked exception and a custom runtime exception, and declare the checked one with throws on the calling method.
Explain how exception propagation unwinds the call stack and identify which method in a chain is allowed to catch a given exception.
Your checkpoint
A program with three methods that deliberately propagate, catch, and rethrow exceptions, producing a printed trace you predicted in advance, plus a decision table mapping ten exception scenarios to their required handling.
Working with Selected classes from the Java API
Manipulate strings with charAt, length, substring, indexOf, replace, trim, and equals, distinguishing equals from == on string literals and new String objects.
Format and parse dates with LocalDate, LocalDateTime, and DateTimeFormatter, and explain immutability when plusDays or minusMonths is called.
Use ArrayList and its add, remove, get, size, and contains methods, and predict the effect of removing by index versus by object.
Build and traverse a simple HashMap, explaining what happens when a duplicate key is put and how to iterate entries safely.
Differentiate StringBuilder mutation from String immutability with a loop that concatenates inside versus outside a builder.
Your checkpoint
A String and API utility class with ten methods (palindrome check, word count, date formatting, list deduplication, map inversion, and others) each accompanied by a passing assertion-style main method that prints PASS or FAIL.
Java Basics & Working With Java Data Types & Using Operators and Decision Constructs & Creating and Using Arrays & Using Loop Constructs & Working with Methods and Encapsulation & Working with Inheritance & Handling Exceptions & Working with Selected classes from the Java API
Re-run every earlier deliverable from a clean directory and fix anything that no longer compiles or behaves as documented.
Take two full-length timed practice tests and log every wrong answer by domain and by root cause (syntax, semantics, or misreading).
Re-study only the two weakest domains from that log, rewriting your cheat sheets for those domains from memory.
Recite the ten most common trap patterns (integer division, missing braces, finally overriding return, array length versus String length, and similar) without notes.
Simulate exam conditions once more under a strict time limit and confirm a score above your target threshold.
Your checkpoint
A final error log showing domain-by-domain accuracy across the last two practice tests, with a written note for every recurring mistake and evidence that all eight prior deliverables still compile and run.
Milestones
Week 2: You can predict the output of any operator or loop snippet involving precedence, increment, short-circuit evaluation, and labeled break without running it, and your self-authored trace questions score at least 18 of 20.
Week 4: Your BankAccount deliverable compiles, demonstrates private-field encapsulation with validated setters, and you can explain overload resolution and access modifiers to another person without notes.
Week 6: Your exception trace program prints exactly the output you predicted, and you can classify any thrown type as checked or unchecked and say whether the compiler requires handling.
Week 8: You score above your target on a full timed practice test, and every one of the eight weekly deliverables still compiles and runs from a clean directory.