Here you can find the source of format(double b)
public static double format(double b)
//package com.java2s; //License from project: Open Source License public class Main { public static double format(double b) { return Math.round(b * 100) / 100.0; }//w w w . ja v a 2s . co m }