程序有错误,运行出现乱码..
import java.io.*;public class zxcx
{
public static void main(String[] args)
{
System.out.println("请输入N");
int a=0,i,j;
BufferedReader bf;
String str;
try{
bf=new BufferedReader(new InputStreamReader(System.in));
str=bf.readLine();
a=Integer.parseInt(str);
}catch(IOException e){}
System.out.println(a);
int[][] b=new int[a][a];
for(i=0;i<a;i++)
for(j=0;j<a;j++) b[i][j]=0;
for(i=0;i<a;i++)
System.out.println(b[i]);
}
}
运行结果:
请输入N
3
3
[I@814013
[I@195d4fe
[I@1d2b01b