Switch expressions were released in Java 14. This article shows how the arrow notation and the use as expression with return values allows a much more concise, clearer and less error-prone notation than before.
How to generate random numbers in Java? How do Math.random() and methods in Random like nextInt() and nextDouble() work?What are pseudorandom numbers? Can they be predicted? If so, how?
Text blocks are a notation for multiline strings in Java. Why do we need them? How do we write and format them? Which escape sequences can or must we use?