I want to convert a character array to a string object using the toString() method in java. Here is a snippet of the test code I used:
import java.util.Array
The default implementation of the toString method of the char [] class returns a String representation of the base address of the array, which is what is being printed here. We cannot change it, since the class of char [] is not extendable.