人在江湖

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  82 Posts :: 10 Stories :: 169 Comments :: 0 Trackbacks
1. remove element without causing ConcurrentModificationException
List<String> names = .
Iterator<String> i = names.iterator();
while (i.hasNext()) {
   // Do something
   i.remove();
}

Note that you must call i.next() before you can call i.remove()

2. 法语,德语中数字小数点用,表示,千位符是"." 如果做支持I18n的UI, 需要显示数字并接受他们输入的数字,可以这样做:
    public static void main(String[] args) throws ParseException{
        String numString = "0.05";
        String frenchNumString = "0,05";
        NumberFormat nf = NumberFormat.getNumberInstance();
        System.out.println("French format of raw string: " + nf.format(Double.parseDouble(numString)));
        
        Double n = (Double) nf.parse(frenchNumString);
        System.out.println("Parse french number and calculate: " + (n + 1));
    }

3. 免费的录屏软件:HyperCam 

posted on 2012-06-23 16:28 人在江湖 阅读(1314) 评论(0)  编辑  收藏 所属分类: java

只有注册用户登录后才能发表评论。


网站导航: