Lets say you had two arrays:
int[] a = {2, 3, 4};
int[] b = {4, 5, 6};
How would you set array a to array b and keep them different dif
For arrays, take a look at:
For ArrayList
:
I think this should give you enough pointers to make progress with your homework.
You may want to use clone
:
a = b.clone();
or use arraycopy(Object source, int sourcePosition, Object destination, int destinationPosition, int numberOfElements)
System.arraycopy(b, 0, a, 0, b.length());