java - Why is there difference between out.println and err.println? -


  1. system.class contains "out" , "err" object of printstream class.
  2. system.class declared static.
  3. println() overloaded method in printstream class have (out , err objects)

if execute system.out.println("xys"); , system.err.println("fdfd");

they both should work same out , err objects of same class except fact don't.

why out.println() prints in black , err.println() prints in red.

because ide you're using prints stderr in red, , stdout in black.

this has nothing java, , environment you're in–it's what's doing coloring, not java itself, doesn't care how output rendered.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -