Multiple choice technology programming languages

float fl = 1.2;

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Java, a floating-point literal like 1.2 is treated as a double by default, not a float. Assigning it to a float without an explicit cast or 'f' suffix causes a compilation error because double cannot be implicitly narrowed to float. Therefore, the statement is invalid and the answer is False. Option B is correct.