Here you can find the source of isLongNumber(BigDecimal minCar)
public static boolean isLongNumber(BigDecimal minCar)
//package com.java2s; /*//w w w. j a va 2 s. co m * Copyright (C) 2010 Viettel Telecom. All rights reserved. * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.math.BigDecimal; public class Main { public static boolean isLongNumber(BigDecimal minCar) { try { Long.parseLong(minCar.toString()); return true; } catch (Exception ex) { return false; } } }