Two ways: Use indexes: double sum = 0; for(int i = 0; i < m.size(); i++) sum += m.get(i); return sum;. Use the "for each" style:
確定! 回上一頁