I have a string like this: John \n Barber
now I want to replace \n with actual new line character so it will become
John
Barber
this is my code for this
replaceAll("\\n", "\n");
but it is not working and giving me same string John \n Barber