Statements in programming that check to see if a Boolean expression is true, and executes a "then" statement if so, otherwise does nothing. These are often called "one-way" conditional statements.
public static void main(String[ ]args){
int=17;
if(age<18){
System.out.println("You are too young");
if(age>= 21){
System.out.println("You are old");
}
if/else
public static void main(String [ ] args){
int=17
if(age<=17){
System.out.println("You are too young")
} else {
System.out.println("You are old");
}