char c = 'a';
String s = Character.toString(c);
//s == "a"
// getting single character from string..
String str="abcd";
char c=str.toChar(0);
System.out.println("output is "+c); // output is a
char c = 'a';
String s = String.valueOf(c); // fastest + memory efficient
String s = Character.toString(c);
String s = new String(new char[]{c});
String s = String.valueOf(new char[]{c});
String s = new Character(c).toString();
String s = "" + c; // slowest + memory inefficient
String string = "ABCDEF" ;
char[] charsFromString = string.toCharArray(); // { 'A', 'B', 'C', 'D', 'E', 'F' }
char c = 'a';
String s = Character.toString(c);
char[] chars = {'a','b','c','d','e'};
string s = new string(chars);
from character to string:
char c = 'a';
String s = Character.toString(c);
//s == "a"
char[] chars = { 'A', 'B', 'C', 'D', 'E', 'F' };
String str1 = String.valueOf(chars); //"ABCDEF"
String str2 = new String(chars);// "ABCDEF"
System.out.println(str1.equals(str2)); //"true"
char ch = 'a';
String.valueOf(ch);
String s = "a";
char c = s.charAt("0");
Character.toString('c');
char mChar = 'l';
String s = Character.toString(mChar);