You are here: Home / Topics / Program to use Boolean Wrapper class in Java

Program to use Boolean Wrapper class in Java

Filed under: Java on 2023-09-19 08:09:43

// Program to use Boolean Wrapper class

class  WrapperBoolean
{
public static void main( String args[ ] )
{
 Boolean b1 = new Boolean(false);
 Boolean b2 = new Boolean("true");

 System.out.println(b1.booleanValue());
 System.out.println(b2.booleanValue());
}
}


Output:

false
true

About Author:
S
Shyam Dubey     View Profile
If you are good in any field. Just share your knowledge with others.