网友您好, 请在下方输入框内输入要搜索的题目:
下列程序中,定义了一个3行4列的数组A,并将A的内容转换为ASCII码值,并复制到数组B中,然后打印出来。
注意:请勿改动main()主方法和其他已有语句内容,仅在横线处填入适当语句。
public class Example1_4
{
private char A[] [] = {{'a', 'b', 'c', 'd'},
{'e', 'f', 'g', 'h'},
{'i', 'j', 'k', 'l'}};
public int ______; //生成一个空的3行4列的数组B
public void copy()
{
for(int i = 0; i < 3; i++)
for(int j = 0; j < 4; j++)
______;
}
public static void main(______ argv[])
{
Example1_4 example = new Example1_4();
example.copy();
for(int i = 0; i < 3; i ++)
{
for(int j = 0; j < 4; j++)
System.out.print(example. B[i] [j] *+" ");
System.out.println ();
}
}
}
参考答案
更多 “ 下列程序中,定义了一个3行4列的数组A,并将A的内容转换为ASCII码值,并复制到数组B中,然后打印出来。注意:请勿改动main()主方法和其他已有语句内容,仅在横线处填入适当语句。public class Example1_4{private char A[] [] = {{'a', 'b', 'c', 'd'},{'e', 'f', 'g', 'h'},{'i', 'j', 'k', 'l'}};public int ______; //生成一个空的3行4列的数组Bpublic void copy(){for(int i = 0; i < 3; i++)for(int j = 0; j < 4; j++)______;}public static void main(______ argv[]){Example1_4 example = new Example1_4();example.copy();for(int i = 0; i < 3; i ++){for(int j = 0; j < 4; j++)System.out.print(example. B[i] [j] *+" ");System.out.println ();}}} ” 相关考题
![瑞牛题库 章节练习 历年真题 模拟试卷](http://assets.51tk.com/51_sidebar_right_index.jpg)