apex boolean to string code example Example: apex string to boolean Boolean b = Boolean.valueOf(str);