2
我創建了一個TreeMap像這樣:java對象的層次結構,並通過對象的功能
TreeMap<Integer, ArrayList<MyClass>> wrap = new TreeMap<Integer, ArrayList<MyClass>>();
我創建了一個構造函數,像這樣:
public foo (TreeMap<Integer, Collection<Spot> > objects) {
this.field = objects;
}
然而,日食給了我一個紅色squigly當我使用的構造,與我wrap
變量作爲一個參數:
The constructor foo(TreeMap<Integer,ArrayList<Spot>>) is undefined
一個ArrayList是TY收集...是的?那麼,爲什麼這不起作用?