Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.out and System.err differences?

 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In another thread, kelvin cheung just asked the following.
Originally posted by kelvin cheung:
hi,
may i ask you whats the difference between : system.out and system.err ?

[ May 06, 2004: Message edited by: Dirk Schreckmann ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to take a look at the System class documentation to see what it has to say.
In a nutshell, they're just two different output streams. By default, in Windows, both streams direct text output to the system console.
Note that the "destination" of these output streams can be changed by calling System.setOut(PrintStream) and System.setErr(PrintStream). So, a programmer could decide to direct all normal output to the console, or to a text file, while directing all critical errors to a different location, like a special error log file.
Are you getting the idea?
[ May 06, 2004: Message edited by: Dirk Schreckmann ]
 
kelvin cheung
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dirk Schreckmann ,
i think i understand more now... ^^
thanks man ^^ ~~
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic