首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

关于局部变量的小疑点

2012-11-10 
关于局部变量的小问题。Java codetry {String a1 new String(uname.getBytes(ISO8859-1), UTF-8)lis

关于局部变量的小问题。

Java code
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([color=#FF0000][b]ser[/b][/color]+1);                }            }        } catch (Exception e) {            e.printStackTrace();            return INPUT;        }        return SUCCESS;    }


请问红色加粗部分的ser如何获取上面通过Colletions.max()获取的这个值呢?谢谢。
必须要在一个方法里面。

[解决办法]
没太理解。。你这个红色加粗部分的ser不已经获得了 Colletions.max()的值了吗。。。
[解决办法]
没看懂!

热点排行
Bad Request.