boolean value meaning code example Example 1: boolean bool x = true; if (x) { print ("Hello") } Example 2: boolean n = true boolean n = true;