|
|
@ -32,6 +32,10 @@ public class AnonymousClass { |
|
|
|
class Hello { |
|
|
|
class Hello { |
|
|
|
int var = (int) longVar; |
|
|
|
int var = (int) longVar; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
System.err.println("all constructors"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Hello() { |
|
|
|
Hello() { |
|
|
|
System.err.println("construct"); |
|
|
|
System.err.println("construct"); |
|
|
|
} |
|
|
|
} |
|
|
@ -53,12 +57,21 @@ public class AnonymousClass { |
|
|
|
|
|
|
|
|
|
|
|
Hello hii = hi; |
|
|
|
Hello hii = hi; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
System.err.println("Anonymous Constructor speaking"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
this.hii.hello(); |
|
|
|
this.hii.hello(); |
|
|
|
hi.hello(); |
|
|
|
hi.hello(); |
|
|
|
return Integer.toHexString(AnonymousClass.this.hashCode() |
|
|
|
return Integer.toHexString(AnonymousClass.this.hashCode() |
|
|
|
+blah); |
|
|
|
+blah); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
System.err.println("Anonymous Constructor continues"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
Object p = new Object() { |
|
|
|
Object p = new Object() { |
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|