With dynamic tests, JUnit 5 allows us to create tests at run time. With this we can parameterize tests. generate hierarchical test plans, and even define tests with lambdas!
With ‘var’ it is possible to ad-hoc combine traits into an instance that matches your exact requirements. This allows for pretty cool experimentation, but unfortunately has some serious downsides.
My first stab at exception handling in Java streams. Explores how to repackage checked exceptions so that they can be thrown without the compiler complaining about it.
Anonymous classes are verbose and obfuscating. Functional implementations can oust them from their last strongholds (“almost-functional” interfaces and abstract classes).
Java has no Elvis operator (or null coalescing operator / null-safe member selection) but with lambda expressions / method references you can roll your own.
See how Java’s creation of instances of non-capturing lambda expressions can lead to unexpected and possibly bug-inducing behavior.