Mega Code Archive

 
Categories / Java Tutorial / Data Type
 

Boolean Literals

The boolean type has two values, represented by literals 'true' and 'false'. The following code declares a boolean variable includeSign and assigns it the value of true. public class MainClass {   public static void main(String[] args) {     boolean includeSign = true;     System.out.println(includeSign);   } }