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 {
 /*w  ww .  j  a va2s . c o m*/
    public static void main(String[] args) {
      
       System.out.println(Boolean.toString(true));
 
    }
}

The output:





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable