|
public static void main (String args[]) {
String str;
str = "\ntest\n";
System.out.println("");
System.out.println("string with \\n characters: " +str+" end");
str = str.replace("\n", "");
System.out.println("");
System.out.println("now it is removed: " +str+" end");
}
|