double grade = 2.7;
grade = Math.round(grade);
the answer is 3.0 but I thought it will be 3 because it is Math.round will return an integer. Why is it 3.0?
The variable "grade" is a double so even if it is set to an integer, the integer will be turned into a double.