Home » Java Convert char to String

Java Convert char to String

by Online Tutorials Library

Java Convert char to String

We can convert char to String in java using String.valueOf(char) method of String class and Character.toString(char) method of Character class.

Java Convert char to String

Java char to String Example: String.valueOf() method

Let’s see the simple code to convert char to String in java using String.valueOf() method.

Let’s see the simple example of converting char to String in java.

Test it Now

Output:

String is: S 

Java char to String Example: Character.toString() method

Let's see the simple code to convert char to String in java using Character.toString() method.

Test it Now

Output:

String is: M 

You may also like