Java tutorial
//package com.java2s; import java.text.DecimalFormat; public class Main { /** * * @param number * @return */ public static String getDecimalNumber(long number) { return getDecimalNumber(number, 1000.0f); } /** * * @param number * @return */ public static String getDecimalNumber(long number, float divider) { DecimalFormat format = new DecimalFormat("#0.0"); return format.format(number / divider); } }