Conversion bool from a string in Java

String str = "true";
boolean boolValue = Boolean.valueOf(str);
//boolValue is true