if(isN=false)
{
System.out.println("您输入的数组含有非法字符,请重新输入。");
}
int[]result=new int[strarray.length];
int temp=Integer.parseInt(strarray[a]);
result[a]=temp;
break;
} 你的result变量是局部变量,return的时候自然会报错啊。而且发现你的定义还是在循环中,每次循环就会重新定义,你也不会得到预期的结果。放在循环外面定义。也就是for(int a=0;a <strarray.length;a++)的前面。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货