【发布时间】:2023-03-20 07:45:02
【问题描述】:
我有客户列表说该列表总是有 5 行我必须删除迭代中的最后三行,
for (Customer cust: oh.getCustomer()) {
// Check the size of order and remove the last three rows
}
有什么建议可以做到这一点吗??
【问题讨论】:
-
您编写的唯一一行代码似乎没有意义。 oh.getCustomer() 会返回一个可迭代的客户集合吗?
-
你没有告诉客户名单的总数。你能详细说明你的问题吗?