Advertisement
thenewboston

Java Programming Tutorial - 20 - Conditional Operators

Aug 22nd, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.16 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.    }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement