March 2018
Intermediate to advanced
324 pages
8h 30m
English
As a demonstration of Optional, we are going to create an in-memory student repository. This repository has a method to find students by their name, which, for convenience, will be considered the ID. The value returned by the method is Optional<Student>; this means that the response might or might not contain a Student. This pattern is basically one of the common scenarios for Optional.
First of all, we need a Student class to represent ...
Read now
Unlock full access