Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 23rd, 2012  |  syntax: None  |  size: 0.30 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }