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