Welcome To The World Of Hacking


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

Saturday

JAVA PROGRAMMING TUTORIAL 8: AND OPERATOR

public class HackDefence{

public static void main(String[]args){

int x,y;

x=49;

y=28;

/* And(&&) operator wants all the conditions to be satisfied */

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...