Java boolean keyword is used to declare a variable as a boolean type which represents only one of two possible values i.e. either true or false . In java, by default boolean variables are initialized with false.