I have the following array:
public int[] ID = {0,1,2,3,4};
I´m calling the following method, which contains an get-method in an framework:
int[] marker = this.m_TuioManager.getID(this.ID);
Get-Method in the framwork class:
public int[] getID(int[] wert)
{
int number= 4;
for (int i = 0; i<=number; i++)
{
for (int j = 0; j<=number; j++)
{
wert[i] = wert[j];
}
}
return wert;
}
The exception is:
Array index out of range
which I don´t understand. Cauze my array has 5 numbers from 0 to 4. And in the for loop I´m iterating until 4. What I want later, is to compare the values in the array like wert[0] = 0, wert[1] = 1 and so on(until 4),with an other variable.