Given a character array and we have to convert it to string.
In this example, we are taking a character array chrArr which is initializing with string character by character. And then, converting character array to string using new String(chrArr) and assigning to the string object str.
Consider the program:
Output