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:
S
Shyam Dubey     View Profile
If you are good in any field. Just share your knowledge with others.