Java Boolean Data Types are a primitive data type. It is used to store only two possible values, either true or false.
Boolean values are mostly used for conditional testing.
Example
boolean b1 = true;
boolean b2 = false;
System.out.println(b1); // Outputs true
System.out.println(b2); // Outputs false
Comments