/** * Simple Boolean logic. * *

Elie Zananiri
* CART 253, Winter 2008

*/ // remember that true and false are reserved words boolean trueArg = true; boolean falseArg = false; if (trueArg) { println("1. This conditional executes and you will see this text output."); } if (falseArg) { println("2. This conditional does NOT execute and you will NOT see this text output."); } if (trueArg && falseArg) { println("3. This conditional does NOT execute and you will NOT see this text output."); } if (trueArg || falseArg) { println("4. This conditional executes and you will see this text output."); } if (!trueArg) { println("5. This conditional does NOT execute and you will NOT see this text output."); } if (!falseArg) { println("6. This conditional executes and you will see this text output."); }