Convert the Kelvin into celsius
celsius= kelvin-273.15;
subtract 273.15 from kelvin value, you got the celsius value.
public String kevinToCelsius(String kelvin) {
double kel, celsius;
kel = Double.parseDouble(kelvin);
celsius = kel - 273.15;
return String.valueOf(celsius).substring(0, 4);
}
subtract 273.15 from kelvin value, you got the celsius value.
public String kevinToCelsius(String kelvin) {
double kel, celsius;
kel = Double.parseDouble(kelvin);
celsius = kel - 273.15;
return String.valueOf(celsius).substring(0, 4);
}
Comments