publicstaticvoid init(int src[], int [] dst, int[] ref) { // initialize the arrays for (int i =0; i<src.length; i++) {
src[i] = i;
dst[i] = 2; // yes, dst[i] needed(otherwise src[i] will be replaced with i)
ref[i] = src[i]; // src[i] depends on the store src[i]
}
}
publicstaticvoid verify(int src[], int[] ref) { // check whether src and ref are equal for (int i = 0; i < src.length; i++) { if (src[i] != ref[i]) {
System.out.println("Error: src and ref don't match at " + i);
System.exit(97);
}
}
}
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.