I use this code String result = args[0].replace("\\n", "\n");
public class HelloWorld {
public static void main(String[] args) {
String result = args[0].replace("\\n", "\n");
System.out.println(result);
}
}
with terminal I can use arg I\\nam\\na\\boy to make System.out.println print out
I
am
a
boy