Boolean parseBoolean() method in Java with examples Last Updated : 01 Oct, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report The parseBoolean() method of Boolean Class is a built in static method of the class java.lang.Boolean which is used to convert a given string to its boolean value. Syntax: Boolean.parseBoolean(String value) Parameters: It takes one parameter value of type string which contains the value which is to be converted to boolean. Return Value: It returns a primitive boolean value. It returns the true if the given value is equals "true" ignoring cases. Else it returns false. Below are java code to illustrate parseBoolean() method: Example 1: JAVA class GeeksforGeeks { // Driver method public static void main(String[] args) { // string value String value = "TrUe"; // parseBoolean using parse Boolean() method boolean result = Boolean.parseBoolean(value); // printing the result System.out.println(result); } } Output: true Example 2: JAVA class GeeksforGeeks { // Driver method public static void main(String[] args) { // string value String value = "true"; // parseBoolean using parse Boolean() method boolean result = Boolean.parseBoolean(value); // printing the result System.out.println(result); } } Output: true Example 3: JAVA class GeeksforGeeks { // Driver method public static void main(String[] args) { // string value String value = "gfg"; // parseBoolean using parse Boolean() method boolean result = Boolean.parseBoolean(value); // printing the result System.out.println(result); } } Output: false Comment More infoAdvertise with us Next Article Boolean parseBoolean() method in Java with examples S ShivamKD Follow Improve Article Tags : Java Java - util package Java-Functions Practice Tags : Java Similar Reads Double parseDouble() method in Java with examples The parseDouble() method of Java Double class is a built in method in Java that returns a new double initialized to the value represented by the specified String, as done by the valueOf method of class Double. Syntax: public static double parseDouble(String s) Parameters: It accepts a single mandato 2 min read Array setBoolean() Method in Java with Examples The java.lang.reflect.Array.setBoolean() method is an inbuilt method used to set a specified Boolean value to a specified index of a given object array. Syntax: Array.setBoolean(Object []array, int index, boolean value) Parameter: This method takes three parameters: array: array of type Object which 3 min read PrintStream print(boolean) method in Java with Examples The print(boolean) method of PrintStream Class in Java is used to print the specified boolean value on the stream. This boolean value is taken as a parameter. Syntax: public void print(boolean booleanValue) Parameters: This method accepts a mandatory parameter booleanValue which is the boolean value 2 min read Field setBoolean() method in Java with Examples The setBoolean() method of java.lang.reflect.Field used to set the value of a field as a boolean on the specified object. When you need to set the value of a field of an object as boolean then you can use this method to set value over an Object. Syntax: public void setBoolean(Object obj, boolean z) 3 min read ParsePosition equals() method in Java with Example The equals() method of java.text.ParsePosition class is used to check if both the ParsePosition objects are same or not. Syntax: public boolean equals(Object obj) Parameter: This method takes ParsePosition objects which will be compared with the current ParsePosition object. Return Value: if both th 2 min read Like