public class test01
{
public static void main(String[] args)
{
String str = new String("hello \\n world!");
System.out.println(str);
}
}
{
public static void main(String[] args)
{
String str = new String("hello \\n world!");
System.out.println(str);
}
}
String s="ab\ncd\nopp";
System.out.println(s);
s=s.replaceAll("\n","\\\\n");
System.out.println(s);
}
cxz7531(大花猫) 的正确···