if(condition){ //action to take if condition is met } else if(condition){ //action to take if first condition is not met but there is a second condition } else{ //actioon to take if all conditions are not met }