Conditional Operators

Learn Conditional Operators in Java

Apples Class

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

int age = 45;

System.out.println(age > 50 ? “You are old” : “you are young”);

}
}

 

Share

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.