package com.jsu.shuzu;
public class shuzu {
public static void main(String[] args) {
String novel[][] = new String[2][];
novel[0] = new String[3];
novel[1] = new String[2];
novel[0][0] = "刘备";
novel[0][1] = "关羽";
novel[0][2] = "张飞";
novel[1][0] = "鲁智深";
novel[1][1] = "扶危济困";
for (String[] book : novel) {
for (String word : book)
System.out.println(word + "");
System.out.println();
}
for (int i = 0; i < novel.length; i++)
for (int j = 0; j < novel[i].length; j++)
System.out.println(novel[i][j]);
}
}
Java学习打卡day15
最新推荐文章于 2024-06-07 20:52:36 发布