返回列表 发帖

新人刚看完第一篇,有个小问题想要请教一下诸位前辈

public class Exercise2 {
        public static void main(String[] args) {
                int size1 = 2;
                int size2 = 10;
                int[][] array = new int[size2][size1];
                for (int i = 0; i < size2; i++) {
                        for (int j = 0; j < size1; j++) {
                                array[j] = 1;
                        }
                }
                for (int i = 0; i < size2; i++) {
                        for (int j = 0; j < size1; j++) {
                                System.out.println("["+i+"]"+"["+j+"]="+array[j]);

                        }
                }
        }
}
求教这段在程序里是怎么起的作用,求具体思路
分享到: QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友

就是红体字部分

TOP

绝对喜欢,好帖子不多哦,顶一下

TOP

代码少东西了吧。
在网上购买本书的读者,请给本书发一个好评。谢谢大家。

TOP

返回列表