Here you can find the source of round(Double num)
public static String round(Double num)
//package com.java2s; //License from project: Apache License public class Main { public static String round(Double num) { return String.format("%.2f", num); }//from ww w . ja va2 s . c o m public static String round(int num) { return num + ".00"; } }