Unix pioneer Ken Thompson once said, “one of my most productive days was throwing away 1000 lines of code.” In this article Cas Saternos highlights practices now possible for writing concise Java code, with a special focus on the new functionality available in JDK 8. Shorter, more elegant code is possible due to the inclusion of Lambda Expressions in the language.
The innovation of parallel streams in Java 8 has diverted attention from a very substantial addition to the concurrency library, the CompletableFuture class. Author Maurice Naftalin eloquently explores CompletableFuture, why it is so useful in programming systems that depend on the interaction of asynchronous tasks, and how it complements fork/join-style parallelism, including parallel streams.
Java 8 lambdas and the new Streams API simplify common idiomatic constructs. In this article we investigate some common use cases in financial services and how they are easily solved with lambdas and Java 8's new Stream API.
This article sheds light on how Java 8 lambda expressions and method references are implemented under the hood, and looks at the generated bytecode and performance implications.