This tutorial we will discuss evolution of switch expression from java 7 to java 17 with an example
#javatechie #java17 #SwitchExpression
notes :
JDK 7 - : Integer
JDK 8 - : String , ENUM
JDK 12
break
arrow function
multiple values in case
JDK 13 - : break keyword replaced with yield keyword
JDK 14 - : preview features to permanet
JDK 17 (2021 sep)
pattern matching - : you can match pattern in case label (you can pass object to case)
Guarded pattern - : you can pass conditional statement inside case value
Null case - : you can pass null case
GitHub:
github.com/Jav...
Blogs:
/ the-evolution-of-switc...
Facebook:
/ 919464521471923
guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
Disclaimer/Policy:
--------------------------------
Note : All uploaded content in this channel is mine and its not copied from any community ,
you are free to use source code from above mentioned GitHub account
7 сен 2024