I’m sure you’ve heard this and that about Java 9: modularity, collection literals (or not?), private methods on interfaces, etc. But if you really want to know all that’s coming, you need this ultimate guide.
Articles about Java streams often repeat a bunch of tropes: streams are for succinctness, ugly mechanics are the norm, anemic pipelines, magic collectors, and weak exception handling. This is a rebuttal to all of them!
At Disy we review almost all the code we write. Here, we want to share why that was not always the case and how we started with code reviews.
I worked for Disy for about 2 years. Now I said goodbye to become the editor of SitePoint’s burgeoning Java channel and have more time for other projects.
There I go babbling about new stream methods and then I forget one: a Stream::iterate overload that produces a finite stream.
With dynamic tests, JUnit 5 allows us to create tests at run time. With this we can more easily parameterize tests or even define them with lambdas!
More about Java 9 – this time: Optional. We’ll see how the new methods ‘stream()’, ‘or()’, and ‘ifPresentOrElse()’ considerably improve its API.
Java 9 is coming! And it is more than just Jigsaw. One of the many changes are new Stream methods: ‘takeWhile’, ‘dropWhile’, and ‘ofNullable’. For more fun with streams!
Hand in hand with a class’s definition of equality goes a matching implementation of hashCode. Again, there are a couple of things to be considered to get it right. Let’s check ’em out!
A fundamental aspect of any Java class is its definition of equality. It is determined by a class’s equals method and there are a couple of things to be considered for a correct implementation. Let’s check ’em out so we get it right!