java.lang

package cn.sxt;

 
import java.lang.*;
 
public class BooleanDemo {
 
   public static void main(String[] args) {
 
      // create a Boolean object b
      Boolean b;
 
      // assign value to b
      b = new Boolean(true);
 
      // create a boolean primitive type bool
      boolean bool;
 
      // assign primitive value of b to bool
      bool = b.booleanValue();
 
      String str = "Primitive value of Boolean object " + b + " is " + bool;
 
      // print bool value
      System.out.println( str );
   }
}
原文地址:https://www.cnblogs.com/hane/p/7275261.html