Wednesday, December 15, 2010

How to use Logical OR operator

The OR operators, | and || apply when you want a true result if either or both of the operands are true. The logical OR , || , has a simile effect to the logical AND in that it omits the evaluation of the right hand operands when the left hand operands is true.Obviously if the left hand operands is the result will be true regardless weather the right operand is true of false.


The effect is to reduce ticket price by 10 percent if  either condition is true.
With an || operation you get a false result only if both operands are false.If either operand is true result is true.

http://worldjavasocietyandme.blogspot.com/

No comments:

Post a Comment