How are Java 9 sets created by the factory method Set.of randomized

Convenient factory methods for creating collections of objects is one of the nice feature that Java 9 brings. Here is how you would create a set: Running this code a couple of times will show how every single run will create a different output. The Java 9 sets created by the newly added factory methods …

Read More How are Java 9 sets created by the factory method Set.of randomized

Scala Pattern Matching, from a Java developer perspective. Part 2.

This is the second part of a series of articles about pattern matching in Scala. In the first part we’ve covered literal pattern matching, matching against different data types and matching on case classes. We’ve decompiled (in Java) the byte code created by Scala just to have a better understanding of the things that happen …

Read More Scala Pattern Matching, from a Java developer perspective. Part 2.