// Make sure the closure is present when the superclass is constructed. // Specifically, Closure4.$1 must have its Closure4.this initialized when Inner calls foo().
publicclass Closure4 {
publicint v;
public Closure4() {
v = 0;
Inner i = new Inner() { publicvoid foo() { if (v != 0) thrownew Error();
}
};
i.foo();
}
publicstaticvoid main(String[] arg) { new Closure4();
}
}
class Inner {
Inner() {
foo();
}
publicvoid foo() { thrownew Error(); }
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.