IT students can you lot help me on this

Status
Not open for further replies.
154059551826490470138.jpg

Do you lot know how to use if function
 

Cambuulo Tonight

Poultry in motion
Java if...else (if-then-else) Statement. The if statement executes a certain section of code if the test expression is evaluated to true. The if statementcan have optional else statement. Codes inside the body of else statement are executed if the test expression is false.


Basic example of if-else function

Int speed;

If (speed>100){
System.out.println("speed high")
}
else{
System.out.println("safe")
}
 
Status
Not open for further replies.

Trending

Top