PRACTICE / UNDERSTAND / REPEAT
Java practice question
Practice control flow with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
1 questionAnswers explainedFree · no login
Try this question
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.