Java toString() Method
The toString() method is used to return a String object representing the specified char value. The result is a string of length 1 consisting solely of the specified char.
Syntax
String toString(char ch)
Parameters
ch-- the character to be converted.
Return Value
Returns the string representation of the specified char value.
Example
public class Test {
public static void main(String args[]) {
System.out.println(Character.toString('a'));
System.out.println(Character.toString('A'));
}
}
The result of executing the above program is:
a A
Other Extensions
Java Character Class