publicstaticvoid main(String[] args) throws Exception {
Random r = Utils.getRandomInstance();
arr = new MyObject[COUNT * 100][]; for (int c = 0; c < COUNT; c++) {
arr[c] = new MyObject[c * 100]; for (int v = 0; v < c; v++) {
arr[c][v] = new MyObject(r.nextInt());
}
}
r = new Random(Utils.SEED); for (int c = 0; c < COUNT; c++) {
MyObject[] b = arr[c]; if (b.length != (c * 100)) { thrownew IllegalStateException("Failure: length = " + b.length + ", need = " + (c*100));
} for (int v = 0; v < c; v++) { int actual = b[v].id(); int expected = r.nextInt(); if (actual != expected) { thrownew IllegalStateException("Failure: expected = " + expected + ", actual = " + actual);
}
}
}
}
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.