package basic;
class TestIt {
static void doIt(int[] z) {
z = null;
}
}
class Arraydemo {
public static void main(String[] args) {
int[] myArray = { 1, 2, 3, 4, 5 };
TestIt.doIt(myArray);
for (int j = 0; j < myArray.length; j++)
System.out.print(myArray[j] + " ");
}
}
can any1 please explain why the output for code is 1,2,3,4,5. ....................................................................................................................................................................................................................