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
need an explanation for this answer? contact us directly to get an explanation for this answer