Logical Operators

Learn Logical Operators in Java

public class Demo {
public static void main(String args[]){

int boyAge = 20;
int girlAge = 26;

if(boyAge < 5 || girlAge > 21){
System.out.println(“You are young”);
} else {
System.out.println(“You are not young”);
}

}

}

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.