It's often helpful to be able to map objectives between exams. Especially when you are studying from an older/newer book than the exam you are taking. Also see
Note: Oracle makes changes to the objectives. These Java 7 objectives are as of when we wrote the the OCP 7 wiki page and varies slightly from the latest. The gist is the same.
OCPJP 7 Objective | OCPJP 7 Text | OCJP 8 Objective |
Section 1: Java Class Design |
1.1 | Use access modifiers: private, protected, and public | 1.2 |
1.2 | Override methods | 2.5 |
1.3 | Overload constructors and other methods appropriately | Not mentioned. Implied? |
1.4 | Use the instanceof operator and casting | 1.3 |
1.5 | Use virtual method invocation | 1.3 |
1.6 | Override methods from the Object class to improve the functionality of your class | 1.4 |
1.7 | Use package and import statements | Not mentioned |
Section 2: Advanced Class Design |
2.1 | Identify when and how to apply abstract classes | 2.1 |
2.2 | Construct abstract Java classes and subclasses | 2.1 |
2.3 | Use the static and final keywords | 2.2 |
2.4 | Create top-level and nested classes | 2.3 |
2.5 | Use enumerated types | 2.4 |
Section 3: Object-Oriented Design Principles |
3.1 | Write code that declares, implements and/or extends interfaces | 2.5 |
3.2 | Choose between interface inheritance and class inheritance | not mentioned |
3.3 | Develop code that implements "is-a" and/or "has-a" relationships | not mentioned |
3.4 | Apply object composition principles | 1.3 |
3.5 | Design a class using the Singleton design pattern | 1.5 |
3.6 | Write code to implement the DAO pattern | not mentioned |
3.7 | Design and create objects using a factory, and use factories from the API | not mentioned |
Section 4: Generics and Collections |
4.1 | Create a generic class | 3.1 |
4.2 | Use the diamond syntax to create a collection | not mentioned, implied? |
4.3 | Analyze the interoperability of collections that use raw type and generic types | not mentioned, implied? |
4.4 | Use wrapper classes and autoboxing | not mentioned, implied? |
4.5 | Create and use a List, a Set and a Deque | 3.2 |
4.6 | Create and use a Map | 3.2 |
4.7 | Use java.util.Comparator and java.lang.Comparable | 3.2 |
4.8 | Sort and search arrays and lists | 3.2 |
Section 5: String Processing |
5.1 | Search, parse and build strings | not mentioned |
5.2 | Search, parse, and replace strings by using regular expressions, using expression patterns for matching limited to: . (dot), * (star), + (plus), ?, \d, \D, \s, \S, \w, \W, \b. \B, [], () | not mentioned |
5.3 | Format strings using the formatting parameters: %b, %c, %d, %f, and %s in format strings | not mentioned |
Section 6: Exceptions and Assertions |
6.1 | Use throw and throws statements | 6.1 |
6.2 | Use the try statement with multi-catch, and finally clauses | 6.2 |
6.3 | Autoclose resources with a try-with-resources statement | 6.3 |
6.4 | Create custom exceptions | 6.4 |
6.5 | Test invariants by using assertions | 6.5 |
Section 7: Java I/O Fundamentals |
7.1 | Read and write data from the console | 8.1 |
7.2 | Use streams to read and write files | 8.2 |
Section 8: Java File I/O (NIO.2) |
8.1 | Use the Path class to operate on file and directory paths | 9.1 |
8.2 | Use the Files class to check, delete, copy, or move a file or directory | 9.2 |
8.3 | Read and change file and directory attributes | not mentioned |
8.4 | Recursively access a directory tree | not mentioned |
8.5 | Find a file by using the PathMatcher class | not mentioned |
8.6 | Watch a directory for changes by using WatchService | not mentioned |
Section 9: Building Database Applications with JDBC |
9.1 | Define the layout of the JDBC API | 11.1 |
9.2 | Connect to a database by using a JDBC driver | 11.2 |
9.3 | Update and query a database | 11.3 |
9.4 | Customize the transaction behavior of JDBC and commit transactions | not mentioned |
9.5 | Use the JDBC 4.1 RowSetProvider, RowSetFactory, and RowSet interfaces | not mentioned |
Section 10: Threads |
10.1 | Create and use the Thread class and the Runnable interface | 10.1 |
10.2 | Manage and control thread lifecycle | not mentioned |
10.3 | Synchronize thread access to shared data | 10.3 |
10.4 | Identify potential threading problems | 10.2 |
Section 11: Concurrency |
11.1 | Use java.util.concurrent collections | 10.1 |
11.2 | Apply atomic variables and locks | 10.3 |
11.3 | Use Executors and ThreadPools | 10.1 |
11.4 | Use the parallel Fork/Join Framework | 10.5 |
Section 12: Localization |
12.1 | Read and set the locale by using the Locale object | 12.2 |
12.2 | Build a resource bundle for each local | 12.4 |
12.3 | Load a resource bundle in an application | 12.1, 12.4 |
12.4 | Format text for localization by using NumberFormat and DateFormat | not mentioned |
OCPJP 8 Objective | OCPJP 8 Text | OCPJP 7 Objective |
Section 1: Java Class Design |
1.1 | Implement encapsulation | Implied in objective 1 |
1.2 | Implement inheritance including visibility modifiers and composition | 1.1 |
1.3 | Implement polymorphism | 1.4, 1.5, 3.4 |
1.4 | Override hashCode, equals, and toString methods from Object class | 1.6 |
1.5 | Create and use singleton classes and immutable classes | 3.5 |
1.6 | Develop code that uses static keyword on initialize blocks, variables, methods, and classes | 2.3 |
Section 2: Advanced Class Design |
2.1 | Develop code that uses abstract classes and methods | 2.1, 2.2 |
2.2 | Develop code that uses final keyword | 2.3 |
2.3 | Create inner classes including static inner class, local class, nested class, and anonymous inner class | 2.4 |
2.4 | Use enumerated types including methods, and constructors in an enum type | 2.5 |
2.5 | Develop code that declares, implements and/or extends interfaces and use the atOverride annotation | 3.1 |
2.6 | Create and use Lambda expressions | new |
Section 3: Generics and Collections |
3.1 | Create and use a generic class | 4.1 |
3.2 | Create and use ArrayList, TreeSet, TreeMap, and ArrayDeque objects | 4.5, 4.6 |
3.3 | Use java.util.Comparator and java.lang.Comparable interfaces | 4.7 |
3.4 | Collections Streams and Filters | new |
3.5 | Iterate using forEach methods of Streams and List | new |
3.6 | Describe Stream interface and Stream pipeline | new |
3.7 | Filter a collection by using lambda expressions | new |
3.8 | Use method references with Streams | new |
Section 4: Lambda Built-in Functional Interfaces |
4.1 | Use the built-in interfaces included in the java.util.function package such as Predicate, Consumer, Function, and Supplier | new |
4.2 | Develop code that uses primitive versions of functional interfaces | new |
4.3 | Develop code that uses binary versions of functional interfaces | new |
4.4 | Develop code that uses the UnaryOperator interface | new |
Section 5:Java Stream API |
5.1 | Develop code to extract data from an object using peek() and map() methods including primitive versions of the map() method | new |
5.2 | Search for data by using search methods of the Stream classes including findFirst, findAny, anyMatch, allMatch, noneMatch | new |
5.3 | Develop code that uses the Optional class | new |
5.4 | Develop code that uses Stream data methods and calculation methods | new |
5.5 | Sort a collection using Stream API | new |
5.6 | Save results to a collection using the collect method and group/partition data using the Collectors class | new |
5.7 | Use of merge() and flatMap() methods of the Stream API | new |
Section 6: Exceptions and Assertions |
6.1 | Use try-catch and throw statements | 6.1 |
6.2 | Use catch, multi-catch, and finally clauses | 6.2 |
6.3 | Use Autoclose resources with a try-with-resources statement | 6.3 |
6.4 | Create custom exceptions and Auto-closeable resources | 6.4 |
6.5 | Test invariants by using assertions | 6.5 |
Section 7: Use Java SE 8 Date/Time API |
7.1 | Create and manage date-based and time-based events including a combination of date and time into a single object using LocalDate, LocalTime, LocalDateTime, Instant, Period, and Duration | new |
7.2 | Work with dates and times across timezones and manage changes resulting from daylight savings including Format date and times values | new |
7.3 | Define and create and manage date-based and time-based events using Instant, Period, Duration, and TemporalUnit | new |
Section 8: Java I/O Fundamentals |
8.1 | Read and write data from the console | 7.1 |
8.2 | Use BufferedReader, BufferedWriter, File, FileReader, FileWriter, FileInputStream, FileOutputStream, ObjectOutputStream, ObjectInputStream, and PrintWriter in the java.io package | 7.2 |
Section 9: Java File I/O (NIO.2) |
9.1 | Use Path interface to operate on file and directory paths | 8.1 |
9.2 | Use Files class to check, read, delete, copy, move, manage metadata of a file or directory | 8.2 |
9.3 | Use Stream API with NIO.2 | new |
Section 10: Java Concurrency |
10.1 | Create worker threads using Runnable, Callable and use an ExecutorService to concurrently execute tasks | 10.1, 11.3 |
10.2 | Identify potential threading problems among deadlock, starvation, livelock, and race conditions | 10.2 |
10.3 | Use synchronized keyword and java.util.concurrent.atomic package to control the order of thread execution | 10.3 |
10.4 | Use java.util.concurrent collections and classes including CyclicBarrier and CopyOnWriteArrayList | 11.1 |
10.5 | Use parallel Fork/Join Framework | 11.4 |
10.6 | Use parallel Streams including reduction, decomposition, merging processes, pipelines and performance | new |
Section 11: Building Database Applications with JDBC |
11.1 | Describe the interfaces that make up the core of the JDBC API including the Driver, Connection, Statement, and ResultSet interfaces and their relationship to provider implementations | 9.1 |
11.2 | Identify the components required to connect to a database using the DriverManager class including the JDBC URL | 9.2 |
11.3 | Submit queries and read results from the database including creating statements, returning result sets, iterating through the results, and properly closing result sets, statements, and connections | 9.3 |
Section 12: Localization |
12.1 | Describe the advantages of localizing an application | 12.1 |
12.2 | Read and set the locale by using the Locale object | 12.1 |
12.3 | Create and read a Properties file | 12.3 |
12.4 | Build a resource bundle for each locale and load a resource bundle in an application | 12.3 |