Boolean booleanValue() method in Java with examples Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The booleanValue() method of Boolean Class is a built in method in java which is used to return the primitive boolean value of instance which is used to call the method booleanValue(). Syntax BooleanObject.booleanValue() Return Value: It returns a primitive boolean value. Below are the examples to illustrate booleanValue() method: Program 1: JAVA class GeeksforGeeks { // Driver method public static void main(String[] args) { // creating a Boolean object. Boolean b = new Boolean(true); // get primitive data type using booleanValue() boolean value = b.booleanValue(); // Print the result System.out.println(value); } } Output: true Example 2: JAVA class GeeksforGeeks { // Driver method public static void main(String[] args) { // creating a Boolean object. Boolean b = new Boolean(false); // get primitive data type using booleanValue() boolean value = b.booleanValue(); // Print the result System.out.println(value); } } Output: false Comment More infoAdvertise with us Next Article Boolean compare() method in Java with Examples S ShivamKD Follow Improve Article Tags : Java Java - util package Java-Functions Practice Tags : Java Similar Reads Boolean equals() method in Java with examples The equals() method of Boolean class is a built in method of Java which is used check equality of two Boolean object. Syntax: BooleanObject.equals(Object ob) Parameter: It take a parameter ob of type Object as input which is the instance to be compared. Return Type: The return type is boolean. It re 2 min read Boolean compare() method in Java with Examples The compare() method of Boolean class is a built in method in Java which is used to compare two boolean values. It is a static method, so it can be called without creating any object of the Boolean class i.e. directly using the class name. Syntax: Boolean.compare(boolean a, boolean b) Parameters: It 2 min read Boolean compareTo() method in Java with examples The compareTo() method of Boolean class is a built in method in Java which is used to compare the given Boolean instance with the current instance. Syntax: BooleanObject.compareTo(Boolean a) Parameters: It takes a Boolean value a as parameter which is to be compared with the current instance. Return 2 min read Map containsValue() method in Java with Examples The java.util.Map.containsValue() method is used to check whether a particular value is being mapped by a single or more than one key in the Map. It takes the value as a parameter and returns True if that value is mapped by any of the key in the map. Syntax: boolean containsValue(Object Value) Param 2 min read Java Guava | Booleans.concat() method with Examples The concat() method of Booleans Class in the Guava library is used to concatenate the values of many arrays into a single array. These boolean arrays to be concatenated are specified as parameters to this method. For example: concat(new boolean[] {a, b}, new boolean[] {}, new boolean[] {c} returns t 2 min read Byte equals() method in Java with examples The equals() method of Byte class is a built in method in Java which is used to compare the equality given Object with the instance of Byte invoking the equals() method. Syntax ByteObject.equals(Object a) Parameters: It takes an Object type object a as input which is to be compared with the instance 2 min read Like