6.11.3.An example of declaring an enum inside a class
class MyClass2 { enum Problem {BIG, HUGE, SMALL }
Problem size;
}
public class MainClass { public static void main(String[] args) {
MyClass2 drink = new MyClass2();
drink.size = MyClass2.Problem.BIG; // enclosing class name required
}
}