Modern Java
Generics, lambdas and streams, and designing a complete program.
About 4 hours of study
Learning objectives
- Write generic classes and methods
- Process data with streams
- Design a complete program
Lessons
- 1
Generics Advanced
Writing classes and methods that work with any type while keeping type safety: type parameters, the diamond operator, generic methods, bounded types such as T extends Comparable, and wildcards.
- 2
Lambdas and streams Advanced
Passing behaviour as values with lambdas and method references, functional interfaces, comparators, and processing collections declaratively with streams: filter, map, sorted, collect, groupingBy and Optional.
- 3
Putting it together: designing a complete program Advanced
Building a small application from the whole course: splitting it into classes with clear responsibilities, choosing collections, validating with exceptions, separating input from logic, and testing by hand.
Module practice
- Java: A generic boxEasy
- Java: A generic stack classMedium
- Java: Generic minimum and maximumHard
- Java: Even squares with a streamEasy
- Java: A department report with collectorsMedium
- Java: A word statistics pipelineHard
- Java: A contact bookEasy
- Java: An inventory with checked rulesMedium
- Java: Event booking with a waiting listHard