Java Money Convert money2String(double money)

Here you can find the source of money2String(double money)

Description

money String

License

Open Source License

Declaration

public static String money2String(double money) 

Method Source Code

//package com.java2s;

public class Main {

    public static String money2String(double money) {
        String[] amounts = (String.format("%.2f", money)).split("\\.");
        String amount = "";
        for (String a : amounts) {
            amount += a;//from   w  ww  .  j  a va 2  s.c om
        }
        return String.format("%012d", Long.valueOf(amount));
    }
}

Related

  1. money2int(long value)
  2. money2str(String money)