public Set courses?
Set 不是接口么 ?創(chuàng)建的courses 類型是接口? 接口應(yīng)用不是在implent接口么? this.courses=new HashSet() 中 右邊是創(chuàng)建的HashSet實(shí)例類的對(duì)象 courses到底指什么?是對(duì)對(duì)象的引用么??
Set 不是接口么 ?創(chuàng)建的courses 類型是接口? 接口應(yīng)用不是在implent接口么? this.courses=new HashSet() 中 右邊是創(chuàng)建的HashSet實(shí)例類的對(duì)象 courses到底指什么?是對(duì)對(duì)象的引用么??
2014-11-30
舉報(bào)
2014-12-01
hashSet是set的一個(gè)接口實(shí)現(xiàn),這里的courses用的就是實(shí)現(xiàn)類hashSet。具體set和hashSet的講解在API中有,你可以下載下來差看一下,