Guide to Writing Cleaner Conditions With Java 12

Photo by Joshua Aragon on Unsplash

Java 12 is here. And it has brought a lot of new features and improvements that I’m personally very excited about. From a language and syntax perspective, the most impressive upgrade is the new optimized way of writing switch cases. Let’s take a look at it!

For our sample scenario, we will just write a function which takes the number of the month as input(numbers ranging from to…