我正在尝试对两个ArrayList进行迭代以调用名为findProfit(ele,c)的功能,但是我对正确的方法感到困惑。请提供所有可能的代码解决方案。
public void calProfitIndex(ArrayList<ArrayList<Package>> elemetList,ArrayList<Integer> capacity){
....ArrayList<Package> ele: elemetList && Integer c: capacity...{
findProfit(ele,c);
}
}
Run Code Online (Sandbox Code Playgroud)