int[] arr = {1, 2, 3, 4, 5}; int[] copy = array; copy[4] = 2; After this code, what is the value of arr[4]? code example
Example: how to make a copy of an array java
int a[] = {1, 8, 3};
// Copy elements of a[] to b[]
int b[] = a.clone();
int a[] = {1, 8, 3};
// Copy elements of a[] to b[]
int b[] = a.clone();