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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

高手看看我這個(gè)那錯(cuò)了?

高手看看我這個(gè)那錯(cuò)了?

道臨 2016-08-23 10:06:47
public?class?Course?{ public?String?id; public?String?name; public?Course(String?id,String?name){ this.id=id; this.name=name; } }import?java.util.HashSet; import?java.util.Set; public?class?Student?{ public?String?id; public?String?name; public?Set?courses; public?Student(String?id,String?name){ this.id=id; this.name=name; this.courses=new?HashSet(); } }import?java.util.ArrayList; import?java.util.List; public?class?TestAdd?{ public?List<Course>?courseAll; public?TestAdd(){ this.courseAll=new?ArrayList(); } public?void?Add(){ Course?cr1=new?Course("1","數(shù)據(jù)結(jié)構(gòu)"); courseAll.add(cr1); Course?cr2=new?Course("2","C語(yǔ)言"); courseAll.add(1,?cr2); courseAll.add(new?Course("3","數(shù)學(xué)")); courseAll.add(new?Course("4","語(yǔ)文")); } public?void?use(){ TestAdd?it=new?TestAdd(); it.Add(); for(Course?cr:it.courseAll){ System.out.println("id:?"+cr.id+" name:?"+cr.name); } } }public?class?Main?{ public?static?void?main(String[]?args)?{ TestAdd?add=new?TestAdd(); add.Add(); add.use(); } }
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1237 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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