Difficulty: Easy
Correct Answer: float f = 1F;
Explanation:
Introduction / Context:This evaluates the correct way of declaring floating-point literals in Java.
Concept / Approach:
Step-by-Step:
Option A: Correct. "1F" explicitly declares a float.Option B: Incorrect. 1.0 defaults to double.Option C: Invalid type mismatch.Option D: Declares double literal with d.Final Answer:float f = 1F;
Discussion & Comments