Difference between ?System.out.println?
and ?System.error.println??

Answer Posted / ranganathkini

P.S. Please correct the questions. It is not:
Difference between ?System.out.println? and
?System.error.println??

It must be:
Difference between ?System.out.println? and
?System.err.println??

The java.lang.System provides 3 static fields System.out,
System.err and System.in which represent the standard output
stream, standard error stream and standard input stream

Standard Output stream connects the program to the system
console screen and is commonly used to display informative
messages to the user.

Standard Error stream by default connects the program system
console screen and is commonly used to display error
messages to the user.

The Standard Input stream connects the program to the system
keyboard device and provides capability to the program to
read from keyboard input.

Java provides facilities by which these streams can be
redirected to other sources or destinations and change the
way the program behaves.

For example, the standard error stream can be redirected to
a output stream that writes to a log file for error analysis.

Is This Answer Correct ?    51 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between hashset and hashmap in java?

460


What are parameters in a method?

581


What is the need of transient variables in Java ?

574


What is the difference between the boolean & operator and the && operator in java programming?

562


How many bits is a string?

521






What are the types of collections in java?

535


What is hashing principle in java?

548


What is difference between calling start() and run() method of thread?

555


What are the features of java?

528


What are some characteristics of interference class?

508


What is difference between throw and throws ?

594


Write a program to print fibonacci series up to count 10.

515


What's the base class of all exception classes?

562


What do you mean by collectors in java 8?

537


What are the approaches that you will follow for making a program very efficient?

640