Java tutorial
//package com.java2s; import java.text.DecimalFormat; public class Main { public static String formatFloat2Point(float num) { String f1 = ""; try { DecimalFormat fnum = new DecimalFormat("0.00"); f1 = fnum.format(num); } catch (Exception e) { e.printStackTrace(); } return f1; } }