Monday, 16 May 2016

Upgrade Java SE 7 to Java SE 8 OCP Programmer 1Z0-810

Exam topics: 



Assume the following:
  • Missing package and import statements: If sample code do not include package or import statements, and the question does not explicitly refer to these missing statements, then assume that all sample code is in the same package, and import statements exist to support them.
  • No file or directory path names for classes: If a question does not state the file names or directory locations of classes, then assume one of the following, whichever will enable the code to compile and run:
    • All classes are in one file
    • Each class is contained in a separate file, and all files are in one directory
  • Unintended line breaks: Sample code might have unintended line breaks. If you see a line of code that looks like it has wrapped, and this creates a situation where the wrapping is significant (for example, a quoted String literal has wrapped), assume that the wrapping is an extension of the same line, and the line does not contain a hard carriage return that would cause a compilation failure.
  • Code fragments: A code fragment is a small section of source code that is presented without its context. Assume that all necessary supporting code exists is present and that the supporting environment fully supports the correct compilation and execution of the code shown and its omitted environment.
  • Descriptive comments: Take descriptive comments, such as "setter and getters go here," at face value. Assume that correct code exists, compiles, and runs successfully to create the described effect.
TOPICS
Lambda Expressions
  • Describe and develop code that uses Java inner classes, including nested class, static class, local class, and anonymous classes
  • Describe and write functional interfaces
  • Describe a lambda expression; refactor the code that uses an anonymous inner class to use a lambda expression; describe type inference and target typing
Using Built-in Lambda Types
  • Describe the interfaces of the java.util.function package
  • Develop code that uses the Function interface
  • Develop code that uses the Consumer interface
  • Develop code that uses the Supplier interface
  • Develop code that uses the UnaryOperator interface
  • Develop code that uses the Predicate interface
  • Develop code that uses the primitive and binary variations of the base interfaces of the java.util.function package
  • Develop code that uses a method reference, including refactoring a lambda expression to a method reference
Java Collections and Streams with Lambdas
  • Develop code that iterates a collection by using the forEach() method and method chaining
  • Describe the Stream interface and pipelines
  • Filter a collection by using lambda expressions
  • Identify the operations, on stream, that are lazy
Collection Operations with Lambda
  • Develop code to extract data from an object by using the map() method
  • Search for data by using methods such as findFirst(), findAny(), anyMatch(), allMatch(), and noneMatch()
  • Describe the unique characteristics of the Optional class
  • Perform calculations by using Java Stream methods, such as count(), max(), min(), average(), and sum()
  • Sort a collection by using lambda expressions
  • Develop code that uses the Stream.collect() method and Collectors class methods, such as averagingDouble(), groupingBy(), joining(), and partitioningBy()
Parallel Streams
  • Develop code that uses parallel streams
  • Implement decomposition and reduction in streams
Lambda Cookbook
  • Develop code that uses Java SE 8 collection improvements, including Collection.removeIf(), List.replaceAll(), Map.computeIfAbsent(), and Map.computeIfPresent() methods
  • Develop code that uses Java SE 8 I/O improvements, including Files.find(), Files.walk(), and lines() methods
  • Use flatMap() methods in the Stream API
  • Develop code that creates a stream by using the Arrays.stream() and IntStream.range() methods
Method Enhancements
  • Add static methods to interfaces
  • Define and use a default method of an interface and describe the inheritance rules for the default method
Use Java SE 8 Date/Time API
  • 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
  • Work with dates and times across time zones and manage changes resulting from daylight savings, including Format date and times values
  • Define, create, and manage date- and time-based events using Instant, Period, Duration, and TemporalUnit

No comments:

Can Jackson Deserialize Java Time ZonedDateTime

Yes, but must include JSR310. Thus ZonedDateTime can be deserialized directly from JSON response to POJO field. <dependency> <g...