0
我需要添加元素到散列表,我的散列表需要有一個數組列表。但我無法找到正確添加表格中元素的方法。請幫助我。static Hashtable <Leader,ArrayList <Integer>> assignedLeader = new Hashtable <Leader,ArrayList <Integer>>(20);
static Hashtable<Integer, ArrayList<Integer>> assignedLeader =
new Hashtable<Integer, ArrayList<Integer>>(20);
我們可以看到您到目前爲止嘗試過的代碼嗎? – Lochemage
我嘗試了很多,但都給了錯誤,所以沒有用這裏寫錯誤代碼 –
如果您打算在單線程應用程序中使用此代碼,請使用HashMap而不是Hashtable – user2506840