我有一个字符串:
John \n Barber
现在我想用实际的换行符替换\n,这样它就会变成
John
Barber
这是我的代码:
replaceAll("\\n", "\n");
但是它没有起作用,给我的是相同的字符串John \n Barber