1String string = "ABCDEF" ;
2
3char[] charsFromString = string.toCharArray(); // { 'A', 'B', 'C', 'D', 'E', 'F' }
1// getting single character from string..
2String str="abcd";
3
4char c=str.toChar(0);
5
6System.out.println("output is "+c); // output is a
1char[] chars = { 'A', 'B', 'C', 'D', 'E', 'F' };
2
3String str1 = String.valueOf(chars); //"ABCDEF"
4String str2 = new String(chars);// "ABCDEF"
5
6System.out.println(str1.equals(str2)); //"true"