Java: if else statements

Last updated on:

if (boolean-expression) {
statement for true case
}
else {
statement for false case;
}


if (x > 0) {
System.out.println("x bigger then 0");
}
else {
System.out.println("x 0 or less");
}
View Comments

Leave a Comment

Use markdown or basic HTML and be nice.