+ 1

\r eclipse

Hi :) working on eclipse i have the same output when i write System.out.println("Hello \r world"); System.out.println("Hello \n world"); Output: Hello world Hello world Or if working on netBeans ,the output is : world Hello world ??? Thank u :)

23rd Jun 2020, 2:28 PM
Hela Chatti
Hela Chatti - avatar
1 Answer
+ 2
According to the behaviour of these 2 escape sequences, the one produced by NetBeans seems to be more apt or more right. If it was in C++, we could blame it on the compiler in most cases 😉 but since Java is somewhat perfect in implementing these, I don't know the reason of the behavior. I would wait and see if someone has an answer for this change in output.
23rd Jun 2020, 3:16 PM
Avinesh
Avinesh - avatar