第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

請問一下這個程序要怎么改啊,現(xiàn)在這個代碼有異常。。。

請問一下這個程序要怎么改啊,現(xiàn)在這個代碼有異常。。。

TOW哈克 2017-05-31 21:33:00
public class Employee {?private String name;?private int age;?private int wage;?public Employee(){}?public Employee(String name,int age,int wage){??this.name=name;??this.age=age;??this.wage=wage;?}?public String getName(){??return name;?}?public int getAge(){??return age;?}?public int getWage(){??return wage;?}?public String toString(){??return name+","+age+","+wage;?}}public class EmployeeList {?private ArrayList<Employee>arr;?public EmployeeList(){??arr=new ArrayList<Employee>();?}?public void getEmployees(InputStream stream){??DataInputStream in=new DataInputStream(stream);??char ch;??String name="";??try {????while((ch=in.readChar())!=','&&ch!=-1)?????name+=ch;????arr.add(new Employee(name,in.readInt(),in.readInt()));????//System.out.println(arr);????name="";??} catch (IOException e) {???e.printStackTrace(); ??}??}?public ArrayList getArr(){??return arr;?}}public class TestApp {?public static void main(String []args)throws IOException{??EmployeeList employeelist=new EmployeeList();??FileInputStream fin=new FileInputStream("d:\\0001\\student.txt");??employeelist.getEmployees(fin);??System.out.println(employeelist.getArr());?}?}
查看完整描述

1 回答

?
呦呦米

TA貢獻(xiàn)90條經(jīng)驗(yàn) 獲得超59個贊

可以把錯誤貼上來,方便分析

查看完整回答
反對 回復(fù) 2017-06-01
  • 1 回答
  • 0 關(guān)注
  • 1376 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號