Which keyword is used in Java to test a condition?
- check
- if
- test
- verify
In Java, the if keyword is used to test a condition. It allows you to execute a block of code only if the condition specified inside the parentheses evaluates to true. The if statement is fundamental for implementing conditional logic in Java programs.
Loading...