devxlogo

February 14, 2019

Boost the Switch Statement in JDK 12

Starting with JDK 12, the “switch” statement is extended so that it can be used as either a statement or an expression. A sample: switch (day) { case MONDAY, FRIDAY,