public static String formatTemperature(Context context,double temperature,boolean isFarhenheit){
  if (isFarhenheit)   temperature=1.8 * (temperature - 273) + 32;
 else   temperature=temperature - 273;
  return String.format(context.getString(R.string.format_temperature),temperature);
}

public static String formatTemperature ( Context context , double temperature , boolean isFarhenheit ) { if ( isFarhenheit ) temperature = 1.8 * ( temperature - 273 ) + 32 ; else temperature = temperature - 273 ; return String . format ( context . getString ( R . string . format_temperature ) , temperature ) ; }
helper method to format the temprature returned by the openweathermap call . the default is celsius .
