Intermediate/Advanced Java
Course Description
This is a modern, fast-paced course suitable for developers with some previous experience in working with Java and Object-Oriented (OO) programming. The course can also be delivered to developers experienced in other OO languages (Python, C++, C#) but with limited Java exposure, as well as used as an advanced Java course for more experienced developers. There are numerous optional parts allowing you to tailor the coverage to your group.
Unit testing is stressed throughout the course, with most labs implemented as JUnit tests.
The course is very hands-on, including numerous code examples and programming labs that reinforce the concepts presented, so that attendees can immediately employ what they’ve learned in their current projects. It is designed to be flexible, and can be customized to fit your needs.
5 Days
Contact us for pricing
Course Objectives
Solidify Java foundational knowledge, including the important contracts of class ObjectUnderstand the uses and consequences of inheritance and composition, and reinforce the role of interfaces
Reinforce fundamental OO principles such as cohesion, coupling, and polymorphism
Use the JUnit testing framework and become fluent in writing assertions to verify correct program behavior
Familiarity with UML modeling in class diagrams and sequence diagrams
Use advanced techniques for object creation, including factories and singletons
Use established design patterns for object composition, including Strategy, Decorator, and Facade
Write and use generic classes and methods
Learn the use cases for inner classes and refactor existing code to use them when appropriate
Create and use custom annotations
Be familiar with reflection and how to use it
Understand the role of functional interfaces
Understand lambda expressions and method references, and use them to pass behavior (methods)
Use the Stream API to perform complex processing of collections and other input sources
Create and use Java modules, understanding module descriptors, modular JARs, exports and dependencies, and the modulepath
Understand the structure and behavior of the modular JDK, and how it supports modular applications as well as legacy classpath-based code
Migrate classpath-based applications to Java 11, understanding the stages of migration and options available
Prerequisites
Working knowledge of Java programming, including use of inheritance, interfaces, and exceptionsPreface: Java State of the Union
Java Release CycleNew Java Versions
Review - Basics
Java EnvironmentClasses 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
Review (Inheritance and Interfaces)
UML OverviewInheritance
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
JUnit
OverviewTests, 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 and Generics
Collections OverviewGenerics 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
Techniques of Object Creation
Design Patterns OverviewControlling Object Creation
Limitations of new Operator, Alternative Techniques
Singleton Pattern
Simple Factory
Factory Method Pattern
Other Techniques
Named Objects, JNDI
Dependency Injection Frameworks
Using Composition and Inheritance Effectively
Inheritance and Composition - Pros and ConsComposition and Delegation
HAS-A, USES Relationships
Strategy Pattern
Decorator Pattern
Façade and Other Patterns
Façade, Proxy, Template Method
Inner Classes
Overview and MotivationStronger Encapsulation, Rules and Caveats
Defining and Using Inner Classes
Member-Level, Method-Local, Anonymous Classes
Static Nested Classes
Nested Classes, Nested Interfaces, Nested Enums
Annotations
OverviewUsing Annotations
Target and Retention Policy
Annotation Parameters, Parameter Shortcuts
Writing Custom Annotations
Syntax, Using the Meta-Annotations
Using a Custom Annotation
Reflection
Overview and APIThe Class Called Class
Obtaining and Inspecting Class Objects
Working with Objects Reflectively
Creating Instances, Invoking Methods, Setting Field Values
Lambda Expressions
Functional Interfaces and LambdasTarget Context
Using Lambda Expressions
Syntax, Lambda Compatibility
Variable Capture
Type Inference
Method References
Three Types of Method References
Refactoring Lambdas into Method References
Streams
OverviewStreams 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
Introduction to Modules
Motivation and OverviewTypes of Modules
Modular JDK
Our Approach
Working with Modules
Defining and Using ModulesServices
Compatibility and Migration
Supported Software Environments
Standard: Java SE and Eclipse IDEOther Available IDEs: IntelliJ IDEA, IBM RAD (upon request)
JavaJava 11Java 19OOPObject Oriented ProgrammingJava ProgrammingEclipse