ENUM Switch Case is Standard way to Implement Switch with String?

i want to implement Switch Case based on String,

java 1.7 is supporting Switch Case with String, but for before version's, it can be possible with Enum. Is this the best and standard way to implement.

Example

public enum MethodType {
        DOUBLE,LIST,STRING,ARRAYLIST,FLOAT,LONG;
    }
    public static void main( String[] args ) {
        String value = "DOUBLE";
        switch( MethodType.valueOf( value ) ) {
        case DOUBLE:
            System.out.println( "It's a double" );
            break;
        case LIST:
            System.out.println( "It's a list" );
            break;
        }
    }


Click here view more answers http://ift.tt/1J98zlK