The static method valueOf parses a String to a Boolean object: public static Boolean valueOf (String string)
public class MainClass { public static void main(String[] args) { Boolean b = Boolean.valueOf("true"); System.out.println(b); } }
true