public enum Color { //Color is of type enum
WHITE(21), BLACK(22), RED(23), YELLOW(24), BLUE(25); private int code; private Color(int c) { code = c; } public int getCode() { return code; }
A java blog with a collection of examples and tutorials on Java and related technologies. (Under maintenance with continuous updates) Be in touch with java jazzle or k2java.blogspot.com.
public enum Color { //Color is of type enum
WHITE(21), BLACK(22), RED(23), YELLOW(24), BLUE(25); private int code; private Color(int c) { code = c; } public int getCode() { return code; }
No comments:
Post a Comment