Java tutorial
//package com.java2s; import java.math.BigDecimal; public class Main { public static String long2str(String amount) { return BigDecimal.valueOf(Long.parseLong(amount)).divide(BigDecimal.valueOf(100L)).toString(); } public static String long2str(long amount) { return BigDecimal.valueOf(amount).divide(BigDecimal.valueOf(100L)).toString(); } }