Here is example how to convert string to char array in Java :
String str = "hello";
char[] chrarr = str.toCharArray();
Here is example how to convert char array to string in Java :
char[] chrarr = {'h', 'e', 'l', 'l', 'o'};
String str = new String(chrarr);
Tidak ada komentar:
Posting Komentar