Java tutorial
enum Tutorial { CSS(400), HTML(250); int price; Tutorial(int p) { price = p; } int showPrice() { return price; } } public class Main { public static void main(String args[]) { Main t = new Main() { protected final Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); } }; for (Tutorial m : Tutorial.values()) { System.out.println(m + " costs " + m.showPrice() + " dollars"); } } }