A preview of the next step to pattern matching for Java (TM) with the new switch statement (JEP-325).
Preview features must be enabled to compile the code:
javac -source 12 --enable-preview com/hascode/tutorial/ExampleWithNewSwitch.java
Please feel free to visit my blog at www.hascode.com for the full examples.
2018 Micha Kops / hasCode.com