Java Data Type Tutorial - Java Boolean.toString(boolean b)








Syntax

Boolean.toString(boolean b) has the following syntax.

public static String toString(boolean b)

Example

In the following code shows how to use Boolean.toString(boolean b) method.

public class Main {
 
    public static void main(String[] args) {
      
       System.out.println(Boolean.toString(true));
 
    }
}

The output: