Here you can find the source of div100(Long input)
public static String div100(Long input)
//package com.java2s; /*/*from w w w .j a va2s . c o m*/ * CommonUtil.java * * Copyright 2007 NHN Corp. All rights Reserved. * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.math.RoundingMode; import java.text.DecimalFormat; public class Main { public static String div100(Long input) { if (input == null || input == 0) { return "0.0"; } Double fl = input / 100d; DecimalFormat df = new DecimalFormat("#.##"); df.setRoundingMode(RoundingMode.FLOOR); return df.format(fl); } }