Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

enum with numbers java

public enum EXIT_CODE {
    A(104), B(203);

    private int numVal;

    EXIT_CODE(int numVal) {
        this.numVal = numVal;
    }

    public int getNumVal() {
        return numVal;
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #enum #numbers #java
ADD COMMENT
Topic
Name
7+1 =