double d = 749.1666666666666; String result = String .format("%.2f",d); System.out.println("result="+result);