class myArray{
public static void main(String args []){
int x[]={2,3};
int y[]={4,5,6};
System.out.println(x);/*gives something like [I@5445a*/
System.out.println(y);/*[I@5442c */
x=y;
System.out.println(x); /*gives same as that of y (i.e [I@5442c ). What does happen here?*/
System.out.println(x[2]);/* gives 6*/
}
}
But what does happen when we use "x=y" ?Does address of y goes to x or something else?Is this garbage value?