Android Celsius to Fahrenheit Convert cToF(Double deg_c)

Here you can find the source of cToF(Double deg_c)

Description

c To F

Declaration

public static Double cToF(Double deg_c) 

Method Source Code

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

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

    public static String cToF(String deg_c) {
        double deg = Double.parseDouble(deg_c);
        return df2.format(deg * (9 / 5) + 32);
    }// w  w  w  . ja  v  a 2 s . c om

    public static Double cToF(Double deg_c) {
        return (deg_c * (9 / 5) + 32);
    }
}

Related

  1. convertFromCelsiusToFahrenheit(float value)
  2. cToF(String deg_c)
  3. getTempInFahrenheit(int celsius)
  4. toFar(float temp)