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.

SuperCall.java 368B

1234567891011121314151617181920
  1. package test2;
  2. class SuperClass {
  3. public void foo() throws Exception {}
  4. }
  5. public class SuperCall extends SuperClass {
  6. int i = 0;
  7. public int bar() throws Exception {
  8. foo();
  9. return 1;
  10. }
  11. public void foo() throws Exception {
  12. if (++i > 5)
  13. throw new Exception("infinite regression?");
  14. super.foo();
  15. }
  16. }