Java examples for Language Basics:boolean
Convert String Object to Boolean Object
public class Main { public static void main(String[] args) { String str = "false"; // w w w . java2 s . c om Boolean blnObj1 = new Boolean(str); System.out.println(blnObj1); Boolean blnObj2 = Boolean.valueOf(str); System.out.println(blnObj2); } }