8 OCP upgrade exam? First pick the right exam. 1Z0-810 is for upgrading from Java 7 OCPJP to Java 8 OCPJP. 1Z0-813 is for upgrading from any SCJP/OCJP Java 6 or earlier.
This table shows what type of book covers the material for each objective. You'd think this would just boil down to "use a Java 8 cert book", but it is more involved that that. Neither upgrade exam is a direct subset of the OCP 8 exam. (Thanks Oracle). Ideally your cert review book has this information in an intro or appendix so you can map directly to the right chapters. It is still useful to have online in general.
Objective | Text | Where to find material |
Section 1: Language Enhancements |
1.1 | Develop code that uses String objects in the switch statement, binary literals, and numeric literals, including underscores in literals | Java 7 or 8. Note: Make sure your Java 8 book covers this topic as it is only on the upgrade exam. |
1.2 | Develop code that uses try-with-resources statements, including using classes that implement the AutoCloseable interface | Java 7 or 8 |
1.3 | Develop code that handles multiple Exception types in a single catch block | Java 7 or 8 |
1.4 | Use static and default methods of an interface including inheritance rules for a default method | Java 8 specific |
Section 2: Concurrency |
2.1 | Use collections from the java.util.concurrent package with a focus on the advantages over and differences from the traditional java.util collections | Java 7 or 8 |
2.2 | Use Lock, ReadWriteLock, and ReentrantLock classes in the java.util.concurrent.locks and java.util.concurrent.atomic packages to support lock-free thread-safe programming on single variables | Java 7 or 8. Note: Make sure your Java 8 book covers this topic as it is only on the upgrade exam. |
2.3 | Use Executor, ExecutorService, Executors, Callable, and Future to execute tasks using thread pools | Java 7 or 8 |
2.4 | Use the parallel Fork/Join Framework | Java 7 or 8 |
Section 3: Localization |
3.1 | Describe the advantages of localizing an application and developing code that defines, reads, and sets the locale with a Locale object | Java 7 or 8 |
3.2 | Build a resource bundle for a locale and call a resource bundle from an application | Java 7 or 8 |
3.3 | Create and manage date- and time-based events by using LocalDate, LocalTime, LocalDateTime, Instant, Period, and Duration, including a combination of date and time in a single object | Java 8 specific |
3.4 | Format dates, numbers, and currency values for localization with the NumberFormat and DateFormat classes, including number and date format patterns | Java 7 or 8. Note: Make sure your Java 8 book covers this topic as it is only on the upgrade exam. |
3.5 | Work with dates and times across time zones and manage changes resulting from daylight savings | Java 8 specific |
Section 4: Java File I/O (NIO.2) |
4.1 | Operate on file and directory paths by using the Path class | Java 7 or 8 |
4.2 | Check, delete, copy, or move a file or directory by using the Files class | Java 7 or 8 |
4.3 | Recursively access a directory tree by using the DirectoryStream and FileVisitor interfaces | Java 7 or 8. Note: Make sure your Java 8 book covers this topic as it is only on the upgrade exam. |
4.4 | Find a file by using the PathMatcher interface, and use Java SE 8 I/O improvements, including Files.find(), Files.walk(), and lines() methods | Java 7 or 8 |
4.5 | Observe the changes in a directory by using the WatchService interface | Java 7 or 8. Note: Make sure your Java 8 book covers this topic as it is only on the upgrade exam. |
Section 5: Lambda |
5.1 | Define and write functional interfaces and describe the interfaces of the java.util.function package | Java 8 specific |
5.2 | Describe a lambda expression; refactor the code that uses an anonymous inner class to use a lambda expression; describe type inference and target typing | Java 8 specific |
5.3 | Develop code that uses the built-in interfaces included in the java.util.function package, such as Function, Consumer, Supplier, UnaryOperator, Predicate, and Optional APIs, including the primitive and binary variations of the interfaces | Java 8 specific |
5.4 | Develop code that uses a method reference, including refactoring a lambda expression to a method reference | Java 8 specific |
Section 6: Java Collections |
6.1 | Develop code that uses diamond with generic declarations | Java 7 or 8. Note: Make sure your Java 8 book covers this topic as it is only on the upgrade exam. |
6.2 | Develop code that iterates a collection, filters a collection, and sorts a collection by using lambda expressions | Java 8 specific |
6.3 | Search for data by using methods, such as findFirst(), findAny(), anyMatch(), allMatch(), and noneMatch() | Java 8 specific |
6.4 | Perform calculations on Java Streams by using count, max, min, average, and sum methods and save results to a collection by using the collect method and Collector class, including the averagingDouble, groupingBy, joining, partitioningBy methods | Java 8 specific |
6.5 | Develop code that uses Java SE 8 collection improvements, including the Collection.removeIf(), List.replaceAll(), Map.computeIfAbsent(), and Map.computeIfPresent() methods | Java 8 specific. Note: Make sure your book covers all four of these. They weren't all on the main OCP exam so whether they are covered depends on when the authors looked at the objectives and how literally they took them. |
6.6 | Develop code that uses the merge(), flatMap(), and map() methods on Java Streams | Java 8 specific. Note: Make sure your book covers all four of these. They weren't all on the main OCP exam so whether they are covered depends on when the authors looked at the objectives and how literally they took them. |
Section 7: Java Streams |
7.1 | Describe the Stream interface and pipelines; create a stream by using the Arrays.stream() and IntStream.range() methods; identify the lambda operations that are lazy | Java 8 specific |
7.2 | Develop code that uses parallel streams, including decomposition operation and reduction operation in streams | Java 8 specific |
Objective | Text | Where to find material |
Section 1: Lambda Expressions |
1.1 | Describe and develop code that uses Java inner classes, including nested class, static class, local class, and anonymous classes | Any version |
1.2 | Describe and write functional interfaces | Java 8 specific |
1.3 | Describe a lambda expression; refactor the code that uses an anonymous inner class to use a lambda expression; describe type inference and target typing | Java 8 specific |
Section 2: Using Built-in Lambda Types |
2.1 | Describe the interfaces of the java.util.function package | Java 8 specific |
2.2 | Develop code that uses the Function interface | Java 8 specific |
2.3 | Develop code that uses the Consumer interface | Java 8 specific |
2.4 | Develop code that uses the Supplier interface | Java 8 specific |
2.5 | Develop code that uses the UnaryOperator interface | Java 8 specific |
2.6 | Develop code that uses the Predicate interface | Java 8 specific |
2.7 | Develop code that uses the primitive and binary variations of the base interfaces of the java.util.function package | Java 8 specific |
2.8 | Develop code that uses a method reference, including refactoring a lambda expression to a method reference | Java 8 specific |
Section 3: Java Collections and Streams with Lambdas |
3.1 | Develop code that iterates a collection by using the forEach() method and method chaining | Java 8 specific |
3.2 | Describe the Stream interface and pipelines | Java 8 specific |
3.3 | Filter a collection by using lambda expressions | Java 8 specific |
3.4 | Identify the operations, on stream, that are lazy | Java 8 specific |
Section 4: Collection Operations with Lambda |
4.1 | Develop code to extract data from an object by using the map() method | Java 8 specific |
4.2 | Search for data by using methods such as findFirst(), findAny(), anyMatch(), allMatch(), and noneMatch() | Java 8 specific |
4.3 | Describe the unique characteristics of the Optional class | Java 8 specific |
4.4 | Perform calculations by using Java Stream methods, such as count(), max(), min(), average(), and sum() | Java 8 specific |
4.5 | Sort a collection by using lambda expressions | Java 8 specific |
4.6 | Develop code that uses the Stream.collect() method and Collectors class methods, such as averagingDouble(), groupingBy(), joining(), and partitioningBy() | Java 8 specific |
Section 5: Parallel Streams |
5.1 | Develop code that uses parallel streams | Java 8 specific |
5.2 | Implement decomposition and reduction in streams | Java 8 specific |
Section 6: Lambda Cookbook |
6.1 | Develop code that uses Java SE 8 collection improvements, including Collection.removeIf(), List.replaceAll(), Map.computeIfAbsent(), and Map.computeIfPresent() methods | Java 8 specific. Note: Make sure your book covers all four of these. They weren't all on the main OCP exam so whether they are covered depends on when the authors looked at the objectives and how literally they took them. |
6.2 | Develop code that uses Java SE 8 I/O improvements, including Files.find(), Files.walk(), and lines() methods | Java 8 specific |
6.3 | Use flatMap() methods in the Stream API | Java 8 specific |
6.4 | Develop code that creates a stream by using the Arrays.stream() and IntStream.range() methods | Java 8 specific |
Section 7: Method Enhancements |
7.1 | Add static methods to interfaces | Java 8 specific |
7.2 | Define and use a default method of an interface and describe the inheritance rules for the default method | Java 8 specific |
Section 8: Use Java SE 8 Date/Time API |
8.1 | Create and manage date- and time-based events, including a combination of date and time in a single object, by using LocalDate, LocalTime, LocalDateTime, Instant, Period, and Duration | Java 8 specific. Goes beyond what is in OCA 8 books. |
8.2 | Work with dates and times across time zones and manage changes resulting from daylight savings, including Format date and times values | Java 8 specific. Goes beyond what is in OCA 8 books. |
8.3 | Define, create, and manage date- and time-based events using Instant, Period, Duration, and TemporalUnit | Java 8 specific. Goes beyond what is in OCA 8 books. |