Java tutorial covering what's new in Java 12 in regards to switch statement which has been released as a preview feature.
The JDK 12 switch statement has been injected with new life. It can now also be used as an expression and is less limiting and more powerful than ever.
The JDK 12 switch statement has really been improved upon by reducing its verbosity while addressing the fall though,
scoping and exhaustiveness issues with enums. The switch statement is still due for further improvements such as pattern matching and extending exhaustiveness to cover sealed types ... scheduled from JDK 13.
JEP 325 - Switch Expressions: https://openjdk.java.net/jeps/325
JEP 305: Pattern Matching for instanceof https://openjdk.java.net/jeps/305
The Project/demo Source code is available on MVP Java's GitHub account here ...
https://github.com/mvpjava/jdk12-Swit...
Just git clone ...
"git clone https://github.com/mvpjava/jdk12-Swit..."
and then execute "run.sh" to play around with the JDK 12 switch statement/expression in a Docker Container.
DON'T CLICK THIS!!! http://bit.ly/2UmF76l
======================================================
Subscribe to MVP Java ...
https://www.youtube.com/c/MVPJava?sub...
Follow me ...
Website : http://www.mvpjava.com
Facebook : / mvpjava
Twitter : / mvpjava
GitHub : https://github.com/mvpjava
DockerHub: https://hub.docker.com/?namespace=mvp...