java取得整数部分 代码

Pattern p1 = Pattern.compile("[0-9]*");
Matcher m1 = p1.matcher("100.0");
boolean bool=m1.find();
if(bool){
    System.out.println(m1.group());
}
posted @ 2013-12-27 14:24  cRaZy_TyKeIo  阅读(282)  评论(0编辑  收藏  举报