In my previous blog post I wrote about how Google Guava’s ListenableFuture is an improvement over Java 6’s Future class. But Java 8 ships with a CompletableFuture class that brings much of the same benefits into the standard Java API. The below code example (again with inline comments) shows how to use CompletableFuture to implement…… Continue reading ListenableFuture vs CompletableFuture – a comparison
Google Guava’s concurrency classes provide some advantages over using Java’s default classes. Guava’s Futures offer the following benefits: You can add “listeners” to the result of a Future’s success or failure, instead of explicitly checking for the return of the Future.get(), handling exceptions and so onYou can chain multiple asynchronous pieces of code together using…… Continue reading How is Google Guava ListenableFuture better than Java Future?
In an article titled The Feel of Java (PDF), James Gosling, one of the language’s creators, explains the design choices which went into the making of that language. He states frankly that Java was not meant to be innovative, but instead tried to synthesize a few carefully chosen long existing ideas to form a coherent…… Continue reading The feel of Java, and Go