Advertisement
thenewboston

Java Programming Tutorial - 19 - else if Statement

Aug 22nd, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. class apples{
  2.    public static void main(String args[]){
  3.       int age = 55;
  4.  
  5.       if (age >= 60)
  6.          System.out.println("You are a senior citizen");
  7.       else if (age >= 50)
  8.          System.out.println("You are in your 50s");
  9.       else if (age >= 40)
  10.          System.out.println("You are in your 40s");
  11.       else
  12.          System.out.println("You are a young buck");
  13.  
  14.    }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement