You are here: Home / Topics / Program to explain Wrapper class Boolean and Character in Java

Program to explain Wrapper class Boolean and Character in Java

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

// Program to explain Wrapper class Boolean and Character.

class  Wrapper4
{
public static void main(String args[ ]) 
{
 Boolean bOb = true;

 if (bOb)
 {
  System.out.println("bOb is true");
 }
 
 Character cOb = 'b'; 
 char ch = cOb;

 System.out.println("ch is " + ch);
}
}

 

Output:

bOb is true
ch is b

About Author:
M
Mr. Dubey     View Profile
Founder and CEO of MCQ Buddy. I just like to help others. This portal helps students in getting study material free.