Java’s records, sealed interfaces and text blocks are catching up with Scala’s case classes, sealed traits and multiline strings
Judge for yourself in this quick IDE-based visual comparison of the Scala and Java translations of Martin Fowler’s refactored Javascript code.