previous |
start |
next
Copying Arrays
- Copying an array reference yields a second reference to the
same array
double[] data = new double[10];
// fill array . . .
double[] prices = data;

- Use clone to make true copy
double[] prices = (double[])data.clone();

previous |
start |
next