String vs Character Array
A character array is a mutable sequence of characters, while a String is a higher-level string abstraction whose behavior depends on the programming language. In Java, for example, String is immutable, whereas char[] is mutable.
A String provides higher-level operations such as searching, slicing, comparison, and concatenation.
A character array provides direct mutable access to individual characters.
Java String objects are immutable.
A char[] can be modified after creation.
Character arrays can sometimes be preferable when sensitive character data must be explicitly cleared from memory, although memory clearing has platform-specific limitations.