Name: gsC80088 Date: 01/05/99
public class Outer {
static class Inner {
public static void foo() {
System.out.println("foo yourself");
}
}
public static void main(String[] args) {
Inner i = new Outer().new Inner();
i.foo();
/* workaround...
Outer o = new Outer();
Outer.Inner i = o.new Inner();
i.foo();
*/
}
}
prints:
Exception in thread "main" java.lang.VerifyError: (class: Outer, method: main si
gnature: ([Ljava/lang/String;)V) Expecting to find unitialized object on stack
(Review ID: 40692)
======================================================================
- duplicates
-
JDK-4150190 Qualified new of static inner class can generate incorrect code
-
- Closed
-