is String Decimal - Java java.lang

Java examples for java.lang:double Format

Description

is String Decimal

Demo Code


//package com.java2s;
import java.math.BigDecimal;

public class Main {
    public static boolean isDecimal(String cadena) {
        try {/*from  w  w  w  .j a v  a 2s. c o  m*/
            new BigDecimal(cadena);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}

Related Tutorials