abstractvoid put(a =new[s]java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
publicintfoo(int i) {
put(i); return i;
}
}
staticclass A extends O { int[] a;
public A(int s) {
a = newint[s];
}
publicvoid put(int i) {
a[i % a.length] = i;
}
}
staticclass B extends O { int sz; int[] a;
public B(int s) {
sz = s;
a = newint[s];
}
publicvoid put(int i) {
a[i % sz] = i;
}
}
publicstaticvoid main(String args[]) { int sum = 0; for (int i = 0; i < 8000; i++) {
+= test1();
} for (int i = 0; i < 100000; i++) {
sum += test2(i);
}
System.out.println("PASSED. sum = " + sum);
}
private O o;
privateint foo(int i) { return o.foo(i);
}
staticint test1(int i) {
Test8002069 t = new Test8002069();
t.o = new A(5); returntfoo(i))
}
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.