Advertisement
Aminpro

Conditional Operator

Dec 29th, 2013
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.15 KB | None | 0 0
  1. class apples{
  2.     public static void main(String args[]){
  3.         int age = 21;
  4.        
  5.         System.out.println(age > 50 ? "You are old" : "You are young");
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement