DecimalFormat formater = new DecimalFormat("#0.##"); System.out.println(formater.format(123456.7897456));