Java Character.toString(char c)

Syntax

Character.toString(char c) has the following syntax.

public static String toString(char c)

Example

In the following code shows how to use Character.toString(char c) method.


public class Main {
  public static void main(String[] argv) {
    Character character2 = new Character('b');
//from  w ww  . j a  v  a  2 s.  c o m
    System.out.println(Character.toString(character2));
  }
}

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