publicclass HeadlessMenu { publicstaticvoid main(String args[]) {
Menu m; boolean exceptions = false; try {
m = new Menu();
} catch (HeadlessException e) {
exceptions = true;
} if (!exceptions) thrownew RuntimeException("HeadlessException did not occur when expected");
exceptions = false; try {
m = new Menu("A Menu");
} catch (HeadlessException e) {
exceptions = true;
} if (!exceptions) thrownew RuntimeException("HeadlessException did not occur when expected");
exceptions = false; try {
m = new Menu("A Menu", false);
} catch (HeadlessException e) {
exceptions = true;
} if (!exceptions) thrownew RuntimeException("HeadlessException did not occur when expected");
exceptions = false; try {
m = new Menu("A Menu", true);
} catch (HeadlessException e) {
exceptions = true;
} if (!exceptions) thrownew RuntimeException("HeadlessException did not occur when expected");
}
}
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.