private Address[] read() throws Exception{
Address[] addressArray = new Address[getLineCounts()];
Scanner scanner = new Scanner(new File("address.txt"));
int i=0;
while(scanner.hasNext()){
String[] array = scanner.nextLine().split(",");//line =1,111,111,111,111,111
addressArray[i++] = new Address(Integer.parseInt(array[0]),array[1],
array[2],array[3],array[4]);
}
return addressArray;
}
变红的那行出错了,我都快愁死了。。。。。不知道为啥出错,说是找不到符号。
------解决方案--------------------