new Boolean(boolean value) : Boolean « java.lang « Java by API






new Boolean(boolean value)

   


public class Main {

  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());
  }

}

   
    
    
  








Related examples in the same category

1.new Boolean(String s)
2.Boolean: boolean booleanValue() (Returns the value of this Boolean object as a boolean primitive)
3.Boolean: parseBoolean(String s)
4.Boolean: String toString()
5.Boolean: valueOf(String stringValue)