Java Number Convert convertToMoney(float money)

Here you can find the source of convertToMoney(float money)

Description

convert To Money

License

Open Source License

Declaration

public static String convertToMoney(float money) 

Method Source Code


//package com.java2s;
import java.math.BigDecimal;

public class Main {

    public static String convertToMoney(float money) {
        BigDecimal objB = new BigDecimal(Double.toString(money));
        return objB.divide(BigDecimal.ONE, 2, BigDecimal.ROUND_HALF_UP).toString();
    }//from www  .j  a  va 2s .  c o  m
}

Related

  1. convertToJBPM(Object value)
  2. convertToKg(int value)
  3. convertToLong(String decimal, int precision)
  4. ConvertToMeters(double distance)
  5. convertToMm(double value)
  6. getMoneyConversion(int money, int divisor)
  7. numToBytes(byte[] buffer, long value)
  8. numToBytes(byte[] buffer, long value, int radix)
  9. numToBytes(long value, byte[] b, int off, int len)