Get boolean value from constants in Boolean class

TypeFieldSummary
static BooleanFALSEThe Boolean object value false.
static BooleanTRUEThe Boolean object value true.
static Class<Boolean>TYPEThe Class object representing the primitive type boolean.

public class Main {
    public static void main(String[] args) {
       System.out.println(Boolean.TRUE);
       System.out.println(Boolean.FALSE);
    }
}

The output:


true
false
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.