2. 2. 11. Convert Java boolean Primitive to Boolean object
public class Main { public static void main(String[] args) { boolean b = true;
// using constructor
Boolean blnObj1 = new Boolean(b);
// using valueOf method of Boolean class.
Boolean blnObj2 = Boolean.valueOf(b);
}
}