Convert String to Boolean in Java

Problem

Given the following String containing a textual representation of a Boolean:

String s = "true";

How to convert this String to a Boolean?

Solution

Boolean b = Boolean.parseBoolean(s);