write a java statement to assign 255.6 to a float type variable
Answers
Answered by
3
Answer:
float a=(float)255.6;
Explanation:
you need to explicitly define (float) otherwise it will give an error of 'loss of precision' as any number having a decimal is treated as double.
Similar questions
Physics,
11 months ago
Math,
11 months ago
Political Science,
1 year ago
English,
1 year ago
Math,
1 year ago