Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FreshJuice{
- enum FreshJuiceSize{SMALL,MEDIUM,LARGE};
- FreshJuiceSize size;
- }
- public class EnumExample {
- public static void main(String[] args) {
- FreshJuice juice = new FreshJuice();
- juice.size = FreshJuice.FreshJuiceSize.MEDIUM;
- System.out.println("Size: " + juice.size);
- }
- }
Add Comment
Please, Sign In to add comment