74
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 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.
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.
Output:
String is: M
Next TopicJava String to Object