Can somebody please explain me the difference between the following cases? In both cases we see an Exception on the console, but they are presented in a different way.
and
Can somebody please explain me the difference between the following cases? In both cases we see an Exception on the console, but they are presented in a different way.
and
There are two ways to send output to the console (here Eclipse console, but anywhere you run your Java program). One using "System.out" and one using "System.err".
Try writing a small program like
....
System.out.println("System.out");
System.err.println("System.err");
....
and run it. You should see that their colors are different.
So it is just where the code printing the stack trace choose to send it to.
If you run it directly from the command line, there is typically no additional treatment and the two will look the same.