A boolean-type variable can only be true or false. Whenever we compare values, we get a boolean that we can store in a variable of that type.

Booleans are an essential component of Java, and indeed, programming in general.