/** * Name: ___________ (login) * Course: CSCI 241 - Computer Science I * Section: 00_ * Assignment Number: ?? * * Project/Class Description * * Known Bugs: */ public class BooleanTests { public static void main (String [] args) { int a = 3; int b = 12; boolean answer = (a != 0 || b >= 5 && b <= 10); if (answer) System.out.println("answer is true"); else System.out.println("answer is false"); boolean result = true; if (result = false) System.out.println("result is false"); else System.out.println("result is true"); System.out.println ("after if, result = " + result); int x = 1; if (x == 1) { System.out.println("x = 1"); System.out.println("going on"); } else System.out.println("x != 1"); // int a = 1 + (x = 1); // System.out.println("a = " + a); } }