java开发之随笔记录 1、java 保留两位小数 DecimalFormat df = new DecimalFormat("#.##"); System.out.println(df.format(123.129123));