Java Magazine, May/June 2019
ORACLE COM JAVAMAGAZINE MAY JUNE 2019 61 java 12 prone In particular switch expressions provide four improvements fall through semantics compound form exhaustiveness and expression form Finally and perhaps more exciting the syntax available to switch has now become richer At the moment in Java 12 the switch cases support only switching on enum String byte short char int and their wrapper classes However in the future there may well be more sophisticated forms and support for structural pattern matching on arbitrary switchable types article Acknowledgments The authors wish to thank Oracles Java langtools team for providing feedback on this article Raoul Gabriel Urma @ raoulUK is the CEO and cofounder of Cambridge Spark a leading learning community for data scientists and developers in the UK He is also chairman and cofounder of Cambridge Coding Academy a community of young coders and students Urma is the lead author of the best selling programming book Modern Java in Action Manning 2018 He holds a PhD in computer science from the University of Cambridge Richard Warburton @ richardwarburto is a software engineer teacher author and Java Champion He is the cofounder of Opsian com and has a long standing passion for improving Java performance Hes worked as a developer in HFT static analysis compilers and network protocols Warburton also is the author of the bestselling Java 8 Lambdas OReilly Media 2014 and teaches via Iteratr Learning and at Pluralsight He holds a PhD in computer science from the University of Warwick
You must have JavaScript enabled to view digital editions.