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:
M
Mr. Dubey     View Profile
Founder and CEO of MCQ Buddy. I just like to help others.