combine char array to string java code example
Example 1: char array to string java
char[] a = {'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'};
String str = new String(a);
Example 2: char array to string
String string = String.valueOf(a);