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.math.BigDecimal;

public class Main {

    public static BigDecimal formatToYuan(String money) throws NumberFormatException {
        if (money.equals("")) {
            return new BigDecimal(0);
        }
        long m = Long.parseLong(money);
        return BigDecimal.valueOf(m);
    }
}