I have a String which is already initialized. Now I want to replace the contents with a character array. I would like to know if doing the following:
stringObj = new String(charArr);
is fine?
Would this lead to any memory leaks?
Sorry if this question has been answered already, I could not find the answer to this at all.