Welcome To The World Of Hacking


Learn Hacking|Teach Hacking|Learn To Secure|Learn To Code

Friday

JAVA PROGRAMMING TUTORIAL 15: ELSE IF STATEMENTS

public class HackDefence{

public static void main(String[]args){

             int age=40;
 
             if(age>=50)
   
                 System.out.println("You are old");
   
             else if(age>=40)
   
     System.out.println("You are almost old");
 
             else if(age>=30)
   
                  System.out.println("You are young");
 
             else
       
                 System.out.println("You are very  young");
 
    }
 
}

OUTPUT:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...