Get boolean value from constants in Boolean class
static Boolean FALSE
- The Boolean object value false.
static Boolean TRUE
- The Boolean object value true.
public class Main {
public static void main(String[] args) {
System.out.println(Boolean.TRUE);
System.out.println(Boolean.FALSE);
}
}
The output:
true
false
Home
Java Book
Essential Classes
Java Book
Essential Classes
Boolean:
- Boolean class
- Get boolean value from constants in Boolean class
- Convert to primitive boolean value
- Use Boolean value constructors
- Compare two boolean values
- Get system property in boolean value
- Convert string to boolean
- Convert boolean to string