CODING:
public class JavaStringToBoolean {
public static void main(String[] args) {
String str = "false";
Boolean blnObj1 = new Boolean(str);
System.out.println(blnObj1);
Boolean blnObj2 = Boolean.valueOf(str);
System.out.println(blnObj2);
}
}
OUTPUT:
false
public class JavaStringToBoolean {
public static void main(String[] args) {
String str = "false";
Boolean blnObj1 = new Boolean(str);
System.out.println(blnObj1);
Boolean blnObj2 = Boolean.valueOf(str);
System.out.println(blnObj2);
}
}
OUTPUT:
Comments
Post a Comment