Android Milliliter to Ounce Convert mlToOz(Double vol_ml)

Here you can find the source of mlToOz(Double vol_ml)

Description

ml To Oz

Declaration

public static Double mlToOz(Double vol_ml) 

Method Source Code

//package com.java2s;
import java.text.DecimalFormat;

public class Main {
    private static DecimalFormat df2 = new DecimalFormat("0.00");

    public static String mlToOz(String vol_ml) {
        double vol = Double.parseDouble(vol_ml);
        return df2.format(vol * 0.0338140225589);
    }//from  w w w .j a  v  a 2s. com

    public static Double mlToOz(Double vol_ml) {
        return vol_ml * 0.0338140225589;
    }
}

Related

  1. mlToOz(String vol_ml)