【发布时间】:2016-12-07 14:14:43
【问题描述】:
我正在尝试扫描 matix,但出现了一些错误。 这是我的代码:
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
long a=in.nextLong();
// ERROR: incompatible types: possible lossy conversion from long to int
long[][] b=new long[a][a];
for(long i=0;i<a;i++){
for(long j=0;j<a;j++)
{
//same error here
b[i][j]=in.nextLong();
}
}
}
}
【问题讨论】:
标签: java