Tag Archives: switch java statement

Use of String variable in Java Switch Statement

There is no way to perform a true switch on a String in Java. With the arrival of JDK 5.0 and its implementation of enum, a reasonably close approximation of this can be done using the following code. Create an enum … Continue reading

Posted in Articles | Tagged | Leave a comment