Java examples for Language Basics:boolean
Boolean expressions and boolean variable assignments
public class Main { public static void main(String[] args) { boolean a = true; boolean b = false; boolean expr1 = a || b; boolean expr2 = a && b; System.out.print("a||b = "); System.out.println(expr1); System.out.print("a&&b = "); System.out.println(expr2); }/*from ww w. j av a2 s. c om*/ }