数组问题,红色句子求解释。
运行结果是输出自己输入的数组package
import
import
import
import java.util.Scanner;
public class Flower {
public static void main(String[] args) throws IOException{
Scanner cin=new Scanner (System.in);
int n=cin.nextInt();
int a[][]=new int[n][n];
Scanner b[]=new Scanner[n];
String s[]=new String [n];
int sum =0;
int i,j;
BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
for(i=0;i<n;i++)
{
s[i]=stdin.readLine();
}
for(i=0;i<n;i++)
{
b[i]=new Scanner(s[i]);//这个是什么意思呢
}
for(i=0;i<n;i++)
{for(j=0;j<n;j++)
{
a[i][j]=b[i].nextInt();
System.out.print(a[i][j]+" ");
}
System.out.println();
}
}}