I used java after a long time and found out that unlike other languages java doesn’t support switch case with strings(only with no’s and enums). What’s the reason behind it? If other languages implement it easily, why not java?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This feature was implemented in Java 7 (which was released in July this year). Why didn’t they implement it earlier? Well J7 was really delayed because of the whole Sun acquisition by Oracle.
Latest documentation: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html