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.

FieldInit.java 422B

123456789101112131415161718192021222324
  1. package test1;
  2. public class FieldInit {
  3. public static int counter = 0;
  4. public static int loop = 3;
  5. public static int get(Object obj) {
  6. System.out.println("FieldInit: get");
  7. return ++counter;
  8. }
  9. public FieldInit() {
  10. do {
  11. --loop;
  12. } while (loop > 0);
  13. }
  14. public static class FI {
  15. public FieldInit fi;
  16. public FI(FieldInit fi) {
  17. this.fi = fi;
  18. }
  19. }
  20. }