Boolean: parseBoolean(String s) : Boolean « java.lang « Java by API






Boolean: parseBoolean(String s)

 
public class Main {
    public static void main(String[] args) {
        String strBoolean = "true";
        
        //String to boolean conversion
        boolean theValue = Boolean.parseBoolean(strBoolean);
        
        System.out.println(theValue);
    }
}
//true

   
  








Related examples in the same category

1.new Boolean(boolean value)
2.new Boolean(String s)
3.Boolean: boolean booleanValue() (Returns the value of this Boolean object as a boolean primitive)
4.Boolean: String toString()
5.Boolean: valueOf(String stringValue)