You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TestSwitchy.java 750B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * @author hilsdale
  3. *
  4. * To change this generated comment edit the template variable "typecomment":
  5. * Window>Preferences>Java>Templates.
  6. * To enable and disable the creation of type comments go to
  7. * Window>Preferences>Java>Code Generation.
  8. */
  9. public abstract class TestSwitchy {
  10. public int i = 3;
  11. public static final int j = 4;
  12. public static void main(String[] args) {
  13. switch (args.length) {
  14. case 0: System.err.println("hi");
  15. case 1: System.err.println("bye"); break;
  16. case 2: System.err.println("two");
  17. default: System.err.println("ning");
  18. }
  19. System.err.println("done");
  20. }
  21. abstract int goo();
  22. void nimbo() {}
  23. }