Hello everyone,I often come to this forum to learn
Java,but It is the first time post new topic.
Could someone tell me why the output is 1,1,2?
------------------------------------------------------------------------
class Amber {
public static void main(
String[] args) {
int[][] a = {{1,2},{0,1,2},{-1,0,2}};
Object[] obj = (Object[])a.clone();
for(int i = 0; i < obj.length; i++) {
int[] ia = (int[])obj[i];
System.out.println(ia[i]+",");
}
}
}
※Study hard and make progress every day※
◎Java:SCJP,SCWCD,SCBCD,SCDJWS,SCEA
◎Solaris:SCSA
◎Oracle:OCA,OCP
◎PMI:PMP