Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java use space in enums

public enum MyEnum {
    INDIA("India"),
    RUSSIAN("Russian"),
    ENGLAND("England"),
    NORTH_AMERICA("North America");    

    private String name;

    MyEnum(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }    
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #space #enums
ADD COMMENT
Topic
Name
3+2 =