public class DoubleArrayTest
{
static String array[][]={{"China","Chinese"},{"Love","Like"},{"Lucy","Lily"}};
static void make(String[][] array)
{
for(int i=0;i<array.length;i++)
{
for(int j=0;j<array[i].length;j++)
{
System.out.print(array[i][j]);
System.out.print(" ");
}
System.out.print('\n');
}
}
public static void main(String args[])
{
DoubleArrayTest how=new DoubleArrayTest();
make( array);
}
}
二维数组的传递及打印输出
最新推荐文章于 2024-04-12 22:10:43 发布