dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Java
Expertise: Intermediate
May 21, 2001

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


System.out Vs. System.err


System.out leads the output to the standard output stream (normally mapped to the console screen). System.err leads the output to the standard error stream (and, by default to the console, as well). The idea behind having these two is that the standard output should be used for regular program output, and standard error should be used for error messages.

Both the streams can be redirected to different destinations. If it is desired to redirect the output to an output file and error messages to a different log file, than on UNIX it can be done as follows:
 
java MyClass > output.log 2>error.log

This causes the regular output (using System.out) to be stored in output.log and error messages (using System.err) to be stored in error.log.

If you have put error messages in your program, but you don
Nitin Garg
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date