本帖最后由 凝聚 于 2013-11-1 09:46 编辑
package Twenty;
import java.io.*;
import java.util.*;
public class Thirteen {
public static void main(String[] args)throws IOException {
method1();
}
public static void method1()throws IOException
{
BufferedReader bufr=new BufferedReader(new FileReader("D:\\File\\a\\a.txt"));
String line=null;
while((line=bufr.readLine())!=null)
{//System.out.println(line);
String[]arr=line.split("=");
System.out.println(arr[0]+"....."+arr[1]);
}
bufr.close();
}
}
这段代码显示错误为:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at Twenty.Thirteen.method1(Thirteen.java:15)
at Twenty.Thirteen.main(Thirteen.java:6)
这是怎么回事啊还有这错误信息是什么意思啊?谢谢回答啊!
|
|