This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Originally posted by saikrishna cinux: what is the actual difference bwtween system.out.println and system.err.println()
The first writes to "standard output". The second writes to "standard error". These two streams are setup by the operating system when the Java program is executed... And can be redirected with the uses of "|", ">", etc. on the command line.
If the Java program is just ran without any redirection (and the java program don't redirect them), there should be no difference.
[cinux]: No boss i nerver see such thing happen in my system. it is displaying correctly the order is correct
The fact that it displays correctly on your system is no guarantee for other systems. On many systems, standard output and standard error will use different buffers, and these buffers may be flushed at different times. On my own system just now I got: