输出结果是竖着分不是以数组的形式怎么解决
int[] [] hobby={{1,3,5},{7,9,11},{13,15,17}};
for(int i=0;i<hobby.length;i++){
for(int j=0;j<hobby[i].length;j++){
System.out.println(hobby[i][j]);
}
}
1
3
5
7
9
11
13
15
17
int[] [] hobby={{1,3,5},{7,9,11},{13,15,17}};
for(int i=0;i<hobby.length;i++){
for(int j=0;j<hobby[i].length;j++){
System.out.println(hobby[i][j]);
}
}
1
3
5
7
9
11
13
15
17
2019-04-23
举报