Call for feedback -- switch expressions in JDK 12

Andy Fendley andy at
Thu Feb 27 08:36:48 UTC 2020

Hi Alex,

Been using the new switch expressions in Java 12 and 13 for a bit and really like them. They cut code down code, get rid of break and the expression capability is useful. One issue I have, is that if I need more than one line of code for each case I have to enclose in a block which makes the code really ugly and worse to be honest. Using the old method this was not the case. 

Hope this helps.


Andy Fendley BEng (Hons) MSc 

Software Consultant

LinkedIN: profile <>

skype	andrewfendley
twitter	@andyfendley
mobile	+44 (0) 7590 726426

More information about the jdk-dev mailing list