在Java中,控制一个double数以两位小数形式输出!


System.out.printf("%.2f", 3.1415926D);
输出 3.14
posted @ 2011-11-27 10:03  氺〤魚Oo。  阅读(174)  评论(0)    收藏  举报