I am having problem. At my main class, I have:
int ints[] = Type.desc(1000);
int auxi[] = new int [1000];
auxi = ints;
System.out.println("========== Init =========");
// Insertion Sort
Algoritmos.insertionSort(ints);
ints = auxi;
The desc method is:
public static int[] desc (int n){
int aux[];
aux = new int[n];
int pos = 0;
for (int i = n-1; i > 0; i--) {
aux[pos++] = i;
}
return aux;
}
The the value of ints and auxi are changed.
How can I save the initial value of the vector ints?