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

Comments

Popular posts from this blog

Flutter Bloc - Clean Architecture

Dependencies vs Dev Dependencies in Flutter

What's new in android 14?