Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import java.text.DecimalFormat;

public class Main {
    public static DecimalFormat df_int = new DecimalFormat("#############");

    public static int formatNum2Int(float v) {
        return Integer.valueOf(df_int.format(v));

    }

    public static int formatNum2Int(double v) {
        return Integer.valueOf(df_int.format(v));

    }
}