Slide 39
Slide 39 text
Slides by richargh.de and
Optional for optional parameters: quite
noisy and cluttered
45
With Optional
1. myMethod(a, Optional.of(b), c, Optional.of(d))
With @Nullable, less clutter, compile-safety
1. myMethod(a, b, c, d)
NullPointerException: d is null,
so this shouldâve been
Optional.ofNullable(d)