Using String.valueOf() method:
Syntax:
char c='S';
String s=String.valueOf(c);
Example:
public class CharToStringExample1{
public static void main(String args[]){
char c='S';
String s=String.valueOf(c);
System.out.println("String is: "+s);
}}
Using Character.toString() method:
Here's a simple code to change char to String in Java using Character.toString() method:
Input:
public class CharToStringExample2{
public static void main(String args[]){
char c='N';
String s=Character.toString(c);
System.out.println("String is: "+s);
}}
Output:
String is: N