Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java enum

public class DaysOfTheWeek {

    public enum Days {m, t, w, r, f, sat, s};
  	    public static void main(String[] args) {
          Days d = Days.t; 
          System.out.println(d);
          //the output would be t
        }
}
Source by openplanning.net #
 
PREVIOUS NEXT
Tagged: #java #enum
ADD COMMENT
Topic
Name
4+6 =