我想分配的雙重[]列出的Hashmap值,但它拋出一個錯誤:如何分配的HashMap的ArrayList <字符串,雙[]>列出
"The method add(Double) in the type List is not applicable for the arguments (Double[])"
ArrayList<HashMap<String, Double[]>> arl = (ArrayList<HashMap<String, Double[]>>) pd.getArrayList();
List<Double> empid = new ArrayList<Double>();
Iterator itr = arl.iterator();
while (itr.hasNext()) {
HashMap<String, Double[]> map = (HashMap<String, Double[]>) itr.next();
empid.add(map.get("id")));
}
如何我可以將Double[]
投到Double.Request
嗎?
嗨感謝這一個也可以,但我的主要問題仍然沒有解決。我將它作爲新的問題發佈。 –