|
First of all, there is not array in the above code.
[PHP]
public class Test
{
public void someMethod()
{
int array[] = new int[10];
passArray(array);
}
public void passArray(int array2[])
{
//do whatever to the array
}
}
[/PHP]
You pass an array through a method via arguments. What ever you do to that array2, array 's value takes that same effect as if it was the array itself.
|