char[] charArray = {'\n'};
String str = String.valueOf(charArray);
System.out.println(str);
So I want to obtain a string of the newline character that is in the array. However, with this code, the output is simply a blank space. How can I get String str= "\n" ?