try {
String a1 = new String(uname.getBytes("ISO8859-1"), "UTF-8");
listAllroundInfo = this.allroundInfoService.findByItem(a1, Long.parseLong(userId));
List<Long> dlist=new ArrayList<Long>();
if(!listAllroundInfo.isEmpty()){
for(AllroundInfo allroundInfo:listAllroundInfo){
System.out.println(allroundInfo.getSerialNumber());
dlist.add(allroundInfo.getSerialNumber());
}
long ser = Collections.max(dlist);
}
if (ids.length > 0) {
int serialNumber = 1; 
for (int i = 0; i < ids.length; i++) {
allroundInfo = new AllroundInfo();
allroundInfo.setSerialNumber(ser+1);
}
}
} catch (Exception e) {
e.printStackTrace();
return INPUT;
}
return SUCCESS;
}请问红色加粗部分的ser如何获取上面通过Colletions.max()获取的这个值呢?谢谢。
必须要在一个方法里面。