Java examples for Language Basics:boolean
Boolean arithmetic expression
public class Main { public static void main(String[] args) { boolean b1 = (6 - 2) == 4; boolean b2 = 22 / 7 == 3 + 1 / 7.0; boolean b3 = 22 / 7 == 3 + 1 / 7; System.out.println(b1); // true System.out.println(b2); // false System.out.println(b3); // true }/*from w w w.j a v a 2 s .c o m*/ }