Java 8 Features – 3 Days
Java 8 Features – 3 Days
Prerequisites:
Developers who are having 4-5 years of real project development experience and already using Java 7.
Course Outline:
Day 1:
LambdaExpressions
- Why Java 8?
- Behaviour Parameterization
· Anonymous classes
· What is a lambda?
- Syntax
· java.util.function
· Refactoring/putting together exercise
· Method references: firstclass
- Functions in Java 8
- Method references recipes
· Type inference
- Using local variables Streams
· What is a Stream?
· Stream operations and patterns
· Filtering
- Mapping
- Finding and Matching
· minBy/maxBy
· Stream Optimization
· the reduce pattern
· Eager vs Lazy
- Short-circuiting and Loop Fusion Defaultandstaticmethodsoninterfaces
- Static methods in interface
- Useful default methods
- Resolution rules
Day 2:
- Collectors
· Collection Operations
· Collecting to lists and sets
· Flexible Collection
- Arithmetic collectors
· Average/Count/Sum
- Summary statistics
- Advanced Queries
- Downstream collectors Mutable Reduction
- Reducing collector Easy DataParallelism
· Why is this important?
- Parallelizing your streams
- Parallel Gotchas
· Don’t use Locks
· Danger of mutability
- Decomposing performance
Day 3:
Date& TimeinJava8
· The problem with existing date and time libraries· New Classes
· The core classes: LocalDate/LocalTime
- Creation
- Enums
· Period and Duration
· Temporal Adjusters
· Instant
· Time Zones
· Backwards Compatibility
- Common API Patterns Optionaldatatypes
- The problem with null
- How Optional improves upon null
· Creating Optional objects
· Default values and actions
- Transforming Optionals with map
- Rejecting values with filter EnhancedConcurrencywithLambdas
- Future and ExecutorService
- CompletableFutures FunctionalProgrammingin Java8
· Immutability
- Concurrency
- Tail-Call Optimization Miscellaneous
- Base64
- Annotations on Java Types
- Repeating Annotations No MorePermanent Generation Conclusion
Comments
Post a Comment