creativity in code.

creativity is that spark of electricity before an explosion.
it allows us, in a single instance to explore all possibilities without hesitation.

Programming - Java - Conditional Operators


Conditional Operators are essential to programming logic. Without them, a program would probably do absolutely nothing.

Lets have a look at Conditional Operators:

class Human{


public static void main(String[] args) {

andint age= 21;

andbool hasEyesand= true;

andbool hasLegsand= true;

andbool isMale = false;

andif((age > 18and) && (hasEyesand== true) && (isMale ==true))

System.out.printlnand(You are an adult human male");

}

}

Now lets take a look at the switch statement in Java:

int launch_time = 4;

switch(launch_time) {

case 0:

case 1:

case 2:

case 3:

case 4:

System.out.println("Launching less than five seconds");

break;

case 5:

case 6:

case 7:

case 8:

case 9:

System.out.println("Launching in ten seconds");

break;

default:

System.out.println("Launching inandless than 20 seconds");

}


Other pages of interest:
[+] Software Development Blog
[+] Software Development Blog
[+] Software Standards - Software houses must declare patents in standard-setting process
[+] Why Optimization matters in Software Development
[+] Running C and Python in browser. Advent of the Low Level Virtual Machine
[+] Microsoft DLR (Dynamic Language Runtime) information released
[+] The Future of Javascript - The Creator ponders
[+] Silverlight and Ruby on Rails


Comments(2)

Posted by Hello! buy cialis , on 11/5/2009 5:44:28 PM
Hello! buy cialis ,

Posted by Hello! cialis , on 11/5/2009 5:50:21 PM
Hello! cialis ,

add comment Add Comment

Add your comment

Email address:
Your name:
Do you want your email to be visible?: