Here you can find the source of numberFormate(double num)
public static int numberFormate(double num)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { public static int numberFormate(double num) { DecimalFormat df = new DecimalFormat("#####0"); String formatNum = df.format(num); return Integer.parseInt(formatNum); }/*from ww w .j av a2 s .c o m*/ }