Java Decimal Create decimal(Object o)

Here you can find the source of decimal(Object o)

Description

decimal

License

Apache License

Declaration

public static boolean decimal(Object o) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static boolean decimal(Object o) {
        double n = 0;
        try {//  w  ww  .  j av a  2s.co m
            n = Double.parseDouble(o.toString().trim());
        } catch (NumberFormatException e) {
            e.printStackTrace();
        }
        if (n > 0.0) {
            return true;
        } else {
            return false;
        }
    }
}

Related

  1. decimal(final int i)
  2. decimalize(double dms)
  3. decimalize(float v)