Q. Which of the following is not a valid way to declare an integer variable in Java?
β
Correct Answer: (B)
int y = 3.14
Explanation: The correct answer is Option B: int y = 3.14.