Computer Science, asked by mohanranjan1947, 1 year ago

What datatype can we use for temperature in Java?

Answers

Answered by jenni2329
1

So we need to write the Java instructions to tell the computer the data type of degreesCelsius and degreesFahrenheit. We know that degrees Fahrenheit can be any number such as 98.6 or 32 or 0 or -10 and degrees Celsius is similar. We will use the primitive data type named double.

hope it helps u'll

plzz mark as a brainliest answer plzzzz

Answered by SohamKundu012
0

Answer:

Datatypes are used to determine the nature of the variable .

Datatype to be used for temperature is double .

When we specify that a variable has a certain datatype we say what values the expression may have .

Explanation:

The datatypes are :

  • Byte .
  • Short .
  • Char .
  • Int .
  • Float .
  • Long .
  • Double .
  • Boolean .
  • String .

Similar questions