for (int index : outOfBoundsIndices) { try {
sb.charAt(index);
fail("StringBuilder.charAt index: " + index + " does not throw IOOBE as expected");
} catch (IndexOutOfBoundsException ex) { // OK
}
try {
sbUtf16.charAt(index);
fail("StringBuilder.charAt index: " + index + " does not throw IOOBE as expected (UTF-16)");
} catch (IndexOutOfBoundsException ex) { // OK
}
try {
sbuf.charAt(index);
fail("StringBuffer.charAt index: " + index + " does not throw IOOBE as expected");
} catch (IndexOutOfBoundsException ex) { // OK
}
try {
sbufUtf16.charAt(index);
fail("StringBuffer.charAt index: " + index + " does not throw IOOBE as expected (UTF-16)");
} catch (IndexOutOfBoundsException ex) { // OK
}
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 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.