Advertisement
thenewboston

Java Programming Tutorial - 18 - Nested if Statements

Aug 22nd, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. class apples{
  2.    public static void main(String args[]){
  3.       int age = 60;
  4.  
  5.       if (age < 50){
  6.          System.out.println("You are young");
  7.       }else{
  8.          System.out.println("You are old");
  9.          if(age > 75){
  10.             System.out.println("You are REALLY old!");
  11.          }else{
  12.             System.out.println("dont worry you arent really thta old");
  13.          }
  14.       }
  15.    }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement