Overview
The course helps participants to learn functional programming with lambdas and streams, as well as the Java Platform Module System (JPMS). UML, Design Patterns, and the use of composition versus inheritance are taught, as is unit testing.
Objectives
At the end of Advanced Java training course, participants will be able to
Prerequisites
All participants must have a working knowledge of Java programming, including the use of inheritance, interfaces, and exceptions.
Course Outline
- Java Release Cycle
- New Java Versions
- Java Environment
- Classes and Objects
- Instance Variables, Methods, Constructors, Static Members
- OO Principles: Data Encapsulation, Cohesion
- Object Contracts: toString(), equals() and hashCode(), Comparable and Comparator
- Packages, Enums, Arrays
- Exceptions
- Date and Time API
- New Language Features
- UML Overview
- Inheritance
- Definition and IS-A Relationship
- Method Overriding, @Override
- OO Principles: Principle of Substitutability, Polymorphism and Encapsulation of Type, Coupling, Open-Closed Principle
- Constructor Chaining
- Interfaces
- Defining and Implementing, Interface Types
- Interface Inheritance
- New Interface Features (Java 8+)
- Default Methods, Static Methods
- Functional Interfaces
- Guidelines
- Overview
- Tests, Assertions, and Fixtures
- Writing and Running Tests
- Assertions
- Test Fixtures, @Before and @After, @BeforeClass and @AfterClass
- Testing for Exceptions
- Best Practices and Test-Driven Development Overview (TDD)
- Collections Overview
- Generics and Type-Safe Collections
- Diamond Operator
- Lists, Sets, and Maps
- Interfaces and Contracts
- Iteration and Autoboxing
- Utility Classes – Collections and Arrays
- Writing Generic Classes
- Inheritance with Generic Types
- Wildcard Parameter Types
- Type Erasure
- Design Patterns Overview
- Controlling Object Creation
- Limitations of new Operator, Alternative Techniques
- Singleton Pattern
- Simple Factory
- Factory Method Pattern
- Other Techniques
- Named Objects, JNDI
- Dependency Injection Frameworks
- Inheritance and Composition – Pros and Cons
- Composition and Delegation
- HAS-A, USES Relationships
- Strategy Pattern
- Decorator Pattern
- Façade and Other Patterns
- Façade, Proxy, Template Method
- Overview and Motivation
- Stronger Encapsulation, Rules and Caveats
- Defining and Using Inner Classes
- Member-Level, Method-Local, Anonymous Classes
- Static Nested Classes
- Nested Classes, Nested Interfaces, Nested Enums
- Overview
- Using Annotations
- Target and Retention Policy
- Annotation Parameters, Parameter Shortcuts
- Writing Custom Annotations
- Syntax, Using the Meta-Annotations
- Using a Custom Annotation
- Overview and API
- The Class Called Class
- Obtaining and Inspecting Class Objects
- Working with Objects Reflectively
- Creating Instances, Invoking Methods, Setting Field Values
- Functional Interfaces and Lambdas
- Target Context
- Using Lambda Expressions
- Syntax, Lambda Compatibility
- Variable Capture
- Type Inference
- Method References
- Three Types of Method References
- Refactoring Lambdas into Method References
- Overview
- Streams vs. Collections
- Anatomy of a Stream
- Understanding the Stream API
- Intermediate Operations and Stream Pipeline
- Java 8 Functional Interfaces: Predicate, Comparator, Function
- Stream Processing
- Filtering, Sorting, Mapping
- Terminal Operations
- Collectors
- Concepts
- Partitioning and Grouping
- Motivation and Overview
- Types of Modules
- Modular JDK
- Our Approach
- Defining and Using Modules
- Services
- Compatibility and Migration