class IfStatement {
public static void main(String[] args) {
int number = 10;
if (number > 0) {
System.out.println("Number is positive.");
}
System.out.println("This statement is always executed.");
}
}
Answers
Answered by
0
Answer:
hdjeurbdhdhhdhhdhfhbduhhrhvdvhh do extra das ifhh jbnv him so mrjyfukYaudulsyukztdukaulsyfldyayikaulaksyl I'll djSu ki ekRzy
Explanation:
crb do that mc re f red rose cheese
Answered by
0
If statement
Explanation:
Output
Number is positive
This statement is always executed.
The syntax of an 'if' statement:
if(conditional_statement) {
statement(s) execute only when condition is true
}
After evaluating conditional statement to true only then set of statements written inside the 'if' execute.
If conditional statement is false, then set of statements written inside the 'if' will not execute.
The statement written after the end of the 'if' always execute, not depends upon conditional statement is TRUE or FALSE.
Similar questions