/** * Purpose: demonstrate how if ... else statements work */ public class IfExample1 { public static void main(String[] args) { boolean boo; // some code goes here which gives boo the value true or false boo = true; if ( boo ) { System.out.println("if: boo is true"); } else { System.out.println("else: boo is false"); } // print value of boo to the screen directly System.out.println("boo is " + boo); } }