Copyright © tutorialspoint.com

Java - toString() Method

previous next


Description:

The method returns a String object representing the specified character valuethat is, a one-character string.

Syntax:

String toString(char ch)

Parameters:

Here is the detail of parameters:

Return Value :

Example:

public class Test{
   public static void main(String args[]){
      System.out.println( Character.toString('c'));
      System.out.println( Character.toString('C'));
   }
}

This produces following result:

c
C

previous next

Copyright © tutorialspoint.com