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*/
}
}
しかし、"x=y" を使用するとどうなるでしょうか? y のアドレスは x または何か他のものに行きますか? これはガベージ値ですか?