Question: what is the difference between char array and string in java?
Answer: Unlike C/C++, string and character arrays are two different things in Java. ... A String is immutable in Java while a character array is mutable. This means that contents of a String object cannot be changed once it is created. Any operation that results in modification of data will result in a new String.