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 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Copyright (c) 2002 Contributors.
  2. *
  3. * This program and the accompanying materials are made available
  4. * under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * PARC initial implementation
  10. */
  11. package org.aspectj.weaver.test;
  12. /**
  13. * @author hilsdale
  14. *
  15. * To change this generated comment edit the template variable "typecomment":
  16. * Window>Preferences>Java>Templates.
  17. * To enable and disable the creation of type comments go to
  18. * Window>Preferences>Java>Code Generation.
  19. */
  20. public abstract class TestSwitchy {
  21. public int i = 3;
  22. public static final int j = 4;
  23. public static void main(String[] args) {
  24. switch (args.length) {
  25. case 0: System.err.println("hi");
  26. case 1: System.err.println("bye"); break;
  27. case 2: System.err.println("two");
  28. default: System.err.println("ning");
  29. }
  30. System.err.println("done");
  31. }
  32. abstract int goo();
  33. void nimbo() {}
  34. }