Check out example codes for "java convert a char[] to string". It will help you in understanding the concepts better.

Code Example 1

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"

Learn ReactJs, React Native from akashmittal.com