CompanyDAO companyDAO = new CompanyDAO();
List companyList = companyDAO.getAllCompanyList();
MycompanyList包含了這樣一個數據:類型不匹配:不能從對象轉換爲列表
[[1, Agastha Medical Center], [2, Agastha Asthma]]
現在我想重複的值,我想傳遞的值爲1查詢,但是當我正在把這個內部的for循環我越來越
for(int k=0;k<=companyList.size();k++){
List companyId =companyList.get(k); // [1, Agastha Medical Center] for k=0;
Type mismatch: cannot convert from Object to List
我需要讀取for循環裏面的值1我怎麼能做到這一點?
不使用普通的'List',使用類型'名單' –