<<< System.arraycopy, used prior to JDK 1.6 | Index | Two-dimensional arrays >>> |
Code that copies part of one array into another array
double[] grades = {92.3, 88.0, 95.2, 90.5}; Arrays.sort(grades); double[] lowestGrades = new double[2]; System.arraycopy(grades, 0, lowestGrades, 0, 2); double[] highestGrades = new double[2]; System.arraycopy(grades, 2, highestGrades, 0, 2);
<<< System.arraycopy, used prior to JDK 1.6 | Index | Two-dimensional arrays >>> |