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:
class Lazyroar { // 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); }} |
true
Example 2:
class Lazyroar { // 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); }} |
false

… [Trackback]
[…] Read More Information here to that Topic: geeksforgeeks.org/boolean-booleanvalue-method-in-java-with-examples-2/ […]
… [Trackback]
[…] Here you will find 63593 additional Information on that Topic: geeksforgeeks.org/boolean-booleanvalue-method-in-java-with-examples-2/ […]
… [Trackback]
[…] Info to that Topic: geeksforgeeks.org/boolean-booleanvalue-method-in-java-with-examples-2/ […]
… [Trackback]
[…] Find More Info here to that Topic: geeksforgeeks.org/boolean-booleanvalue-method-in-java-with-examples-2/ […]