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);


Popular posts from this blog

Clear the app data programmatically in android

convert an integer to a string in java

Print the large string values in android log cat.