Java 8ize these examples.