Boolean literals are the source code representation for boolean values. : boolean « Java Source And Data Type « SCJP






A boolean value can only be defined as true or false. 

public class MainClass{
    public static void main(String[] argv){

        boolean t = true;  // Legal
        boolean  f = 0;    // Compiler error!

        System.out.println();

    }
}
Type mismatch: cannot convert from int to boolean








1.12.boolean
1.12.1.Boolean literals are the source code representation for boolean values.
1.12.2.The only valid literals of boolean type are true and false.
1.12.3.The default value of a boolean is false.