What is String in Swtich feature in JDK7 example
|Top Tutorials||New Tutorials||Submit||Login||Register|
Total Hits: 11064
Total Votes: 139 votes
Category: JAVA/Core JAVA
Submitted on: 2011-09-01 13:49:37
Submitted By: Javin Paul
Description:Have you ever feel that String should be used in switch cases as like int and char? JDK 7 has made an important enhancement in there support of String, now you can use String in switch and case statement, No doubt String is most widely used type in Java and in my opinion they should have made this enhancement long back when they provided support for enum in java and allowed enum to be used in switch statement. In this java tutorial we will see how we can use String inside switch and case statement in JDK 7. More detail...