发现我可以做到以下几点:
package test.java.lang;
import java.util.Arrays;
public class Tester_ArrayCloning_01 {
public static void main(String[] args) {
double[] vals1 = {1.2, 2.3, 3.4, 4.5};
double[] vals2;
// vals2 = (double[])vals1.clone(); // was thinking should do so
vals2 = vals1.clone(); // but happened can do so
System.out.println(Arrays.toString(vals2));
}
}
为什么?什么时候介绍的?