Which of these will show an error in Java A) int i = 4; B) float f = 5.8; C) double d = 9.1; D) String s = "Hello";
Answers
Answered by
1
Answer:
B
Explanation:
Declaration of float in java shold be float f = 5.8f;
Answered by
2
B) float f = 5.8
Reason
We must type a 'f' at the last of the digit to convert the digit from double to float.
Similar questions