Course description
Java has been significantly changed in version 8. Many long-planned features were introduced in the language, making it more functional. Using these features requires new approaches to programming and a deep understanding of new principles.
This training is designed to help participants understand the new features of Java 8. The course covers lambda expressions, data streams, stream data processing with map-filter-reduce approach, asynchronous programming and DateTime API. Every key area has a number of practical exercises that allows participants to practice what they learned.
Upcoming start dates
Who should attend?
Prerequisites
Java knowledge is required. Practical experience in Java programming is desirable.
Training content
1) Lambda expressions
- Lambda syntax
- Functional interfaces
- Package java.util.function and predefined functional interfaces
- Method references
- Constructor references
- Default methods in interfaces
- Default methods and diamond problem
2) Streams
- What is a Stream?
- Ways to create a Stream
- Map/Filter/Reduce approach
- Map/Filter/Aggregate
- Aggregation functions
- Reduce in sequental and parallel processing
- forEach method
- Consumers chaining
- Predicates
- peek method
- map operation
- flatmap operation
- aggregation and reduction
- Optional type
- Collectors
- Using collectors as group by
- IntStream and other special streams
- Random stream
- Parallel streams
3) Fork/Join framework
- ForkJoinPool
- Classes used for Fork/Join
- Fork/Join example
- Fork/Join and parallel stream processing: benchmarks
4) Date and Time API
- Problems with Date and Calendar in Java 8
- LocalDate, LocalTime, LocalDateTime
- Instant class
- Clock class
- ZonedDateTime
- DayOfWeek class
- Duration class
- Period class
5) Asynchronous programming
- Problems with multithreading
- Parallel and asynchronous programming
- Benefits of asynchrnous approach
- Java 1 approach to multithreading
- Java 5 approach: Future class
- Java 8 approach: CompletableFuture class
- Data flow as a pipeline
- Starting several pipelines in parallel
- Composing futures
- Combining futures
- Synchronous and asynchronous CompletableFuture methods
- Using anyOf/applyToEither to get the winner result
- Summary of CompletableFuture methods
- Handling exceptions in CompletableFuture
- Using checkpoints in method handling
- Cancellation of CompletableFuture
- Using CompletableFuture in real-life data flow processing
- Asynchronous APIs in Java
Certification / Credits
Objectives
To introduce developers to the features in Java 8.
Quick stats about Luxoft Training Center?
More than 200 training courses
Conducted over 1,500 training sessions
Customized training solutions for business
Contact this provider
Luxoft Training Center
Luxoft Training Center — an essential part of the global technology leader, Luxoft, a DXC Technology Company. We play a pivotal role in propelling B2B businesses forward by delivering customized training solutions. Emphasizing the significance of learning and employee development,...