Here you can find the source of formatNumber(double dscore)
static String formatNumber(double dscore)
//package com.java2s; public class Main { static String formatNumber(double dscore) { long score = Math.round(dscore * 100); return score / 100 + "." + (score % 100 < 10 ? "0" : "") + score % 100; }// w w w .j av a 2 s. com }