Print a carriage return in java on windows on console
I had the statement and it worked in the command prompt
System.out.println("This is Java"+'\r'+"That");
and gives me output as
That is Java
That means it works perfectly.
Note: I run it in Windows 7 with JDK 7 and simple notepad.
It is the problem of eclipse, it will take \r as a new line character and will print
This is Java
That
as output