Convert Boolean object to boolean primitive - Java Language Basics

Java examples for Language Basics:Primitive Types

Description

Convert Boolean object to boolean primitive

Demo Code

 
public class Main {
 
  public static void main(String[] args) {
    Boolean blnObj = new Boolean("true");
   /*from w  ww  .j a  va  2  s . c o m*/
    boolean b = blnObj.booleanValue();
    System.out.println(b);
  }
}

Result


Related Tutorials