1 package test3; 2 3 public class NestedClass { 4 public class Inner { 5 int i; 6 } 7 8 public static class StaticNested { 9 int k; 10 } 11 foo()12 public Object foo() { 13 return new Object() { 14 public String toString() { return "OK"; } 15 }; 16 } 17 18 public Object bar() { 19 class Local { 20 @SuppressWarnings("unused") 21 int j; 22 } 23 return new Local(); 24 } 25 } 26