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

Can a class be defined inside an interface?

565


Difference between stack and queue?

589


Why do we need variables?

531


Where are variables stored?

554


What is bean? Where it can be used?

607






What is scope & storage allocation of static, local and register variables? Explain with an example.

568


What are "methods" and "fields"?

577


Can you tell me range of byte?

562


What is flag in java?

535


What is the purpose of the enableevents() method in java programming?

590


How to pass arraylist to stored procedure in java?

550


What do you mean by formatting?

547


What is nullpointerexception?

558


What is garbage collector?

622


What package is math in java?

537