Does Java permit an int directly as the condition of an if statement?
Answer & explanation
Answer: No; the condition must be boolean-compatible
Java does not use C-style numeric truthiness for conditions.
Practice control flow with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
Answer: No; the condition must be boolean-compatible
Java does not use C-style numeric truthiness for conditions.