blob: 3e18f7a33f3303bbf75c226960e50c7e51f8938b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package test4;
public class NestedClass {
public S.S2 s2;
public class N {
public String toString() { return "N"; }
}
public static class S {
public String toString() { return "S"; }
public static class S2 {
public String toString() { return "S2"; }
}
}
public Object foo() {
class In {
public String toString() { return "S"; }
public String toString2() { return new S().toString(); }
}
return new Object() {
public String toString() {
return new Object() {
public String toString() {
return "ok";
}
}.toString();
}
};
}
}
|