将布尔型基本体转换为布尔型对象
public class Main { public static void main(String[] args) {//来 自 n o w j a v a . c o m - 时代Java boolean b = true; //1. using constructor Boolean blnObj1 = new Boolean(b); //2. using valueOf method of Boolean class. This is a static method. Boolean blnObj2 = Boolean.valueOf(b); } }