Android examples for java.lang:Math
get Integer Count
//package com.java2s; import java.math.BigDecimal; public class Main { public static int getIntegerCount(BigDecimal value) { int absIntValue = value.abs().intValue(); return absIntValue > 0 ? String.valueOf(absIntValue).length() : 0; }//from w w w.j a v a 2s . c om }