Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static int getFormatDoubleIntValye(Object o) {
        try {
            double v = (o != null && !o.toString().equals("")) ? Double.parseDouble(o.toString()) : 0;
            return (int) v;
        } catch (Exception ex) {
            return 0;
        }
    }
}