public int[] StringToInt(String[] arrs){
int[] ints = new int[arrs.length];
for(int i=0;i<arrs.length;i++){
ints[i] = Integer.parseInt(arrs[i]);
}
return ints;
}
public void map(Object key, Text value, Context context)
throws IOException, InterruptedException {
//StringTokenizer itr = new StringTokenizer(value.toString());
String[] s=value.toString().split("");
int[]a=new int[s.length];
try{
a=StringToInt(s);
}
catch (Exception e) {
System.err.println("错误");
}//转化为int类型的数组
为什么转化一下数组的格式汇出错误啊?