So I'm having a trouble formatting a String.
My output should always be ##.##C or F
(temperature conversion)
so here is my method:
public void setResultLabel(double inNumber, char inChar)
{
String number, letter;
number = String.valueOf(inNumber);
letter = String.valueOf(inChar);
String temp;
temp = number + letter;
String format = String.format("%2.5s", temp); /* how do you make this code
so that the out put result will always be up to two decimal places
with a char C or F? */
result.setText(format);
add(result);
}