Welcome To The World Of Hacking


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

Saturday

JAVA PROGRAMMING TUTORIAL 9: OR OPERATOR

public class HackDefence{

public static void main(String[]args){

int x,y;

x=49;

y=58;

/* For OR(&&) operator,it is not necessary to satisfy both the condition */

if(x>20 ||y<40){

System.out.println("Successful");

                  }else{

System.out.println("Failure");

}

}

OUTPUT:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...