We would like to know how to get the string representation of a boolean.
The static method toString() returns the string representation of a boolean:
public static String toString (boolean boolean)
public class MainClass { public static void main(String[] args) { Boolean b = Boolean.valueOf("true"); System.out.println(b.toString()); } }
The code above generates the following result.