This method returns a String object representing the specified character value, that is, a one-character string.
String toString(char ch)
Here is the detail of parameters −
ch − Primitive character type.
public class Test { public static void main(String args[]) { System.out.println(Character.toString('c')); System.out.println(Character.toString('C')); } }
This will produce the following result −
c C