您所在的当前位置: 计算机等级考试题库   >  
JAVA题库  
  >   [问答题] 下列程序中,定义了一个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 ();
问题:
发布时间:2022-07-01

[问答题] 下列程序中,定义了一个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 ();


可能感兴趣的题目: