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.

InnerFieldRef.java 352B

123456789101112131415161718192021
  1. public class InnerFieldRef {
  2. private Foo foo = new Foo();
  3. private static int x;
  4. public static void main(String[] args) {
  5. new InnerFieldRef().new Inner().m();
  6. }
  7. private class Inner {
  8. public void m() {
  9. foo.b = true;
  10. (new InnerFieldRef()).x = 3;
  11. }
  12. }
  13. }
  14. class Foo {
  15. public boolean b;
  16. }