SHARE
TWEET

Untitled

a guest Jul 23rd, 2012 17 Never
  1. public enum EnumWithBehavior {
  2.     VALUE1() {
  3.         public void foo() { System.out.println("1"); }
  4.     },
  5.     VALUE2() {
  6.         public void foo() { System.out.println("2"); }
  7.     },
  8.     VALUE3() {
  9.         public void foo() { System.out.println("3"); }
  10.     };
  11.     public abstract void foo();
  12. }
RAW Paste Data
Top