我是 Java 8 的新手。
我想使用java8并想在下面转换为java8。
List<Model> listModel;
for (Model model : listModel)
{
try
{
new UpDateData().bankData(model.getCust_id(), model.getBank_id(), model.getDate());
}
catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
Run Code Online (Sandbox Code Playgroud)
模型类::
public class Model
{
private int cust_id;
private int bank_id;
private String date;
//setter and getter
}
Run Code Online (Sandbox Code Playgroud)
我的问题如何在上面的列表中应用 java 8 功能,我想迭代并调用另一个函数。