publicstaticvoid main(String... args) { try { new Pos12().test();
} catch (A exception) { try { try { throw exception; // used to throw A, now throws Ab
} catch (Ac cException) { // This should NOT catch sibling exception Ab thrownew RuntimeException("FAIL: Should not be caught in catch Ac");
}
} catch (Ab | Ac bcException) { if (bcException instanceof Ac) { thrownew RuntimeException("FAIL: Sibling exception Ab not caught as expected");
} elseif (bcException instanceof Ab) {
System.out.println("PASS");
}
}
}
}
publicvoid test() { thrownew Ab(); }
staticclass A extends RuntimeException {}
// Test class staticclass Ab extends A {}
// Test class staticclass Ac extends A {}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-10-11)
¤
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.