how to convert a boolean to true in java code example Example: how to convert string to boolean in java boolean bool = Boolean.parseBoolean(str);