• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the different b/w System.out & System.err & System.in  RSS feed

 
Dhineshkumar raj
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the different b/w
System.out &
System.err &
System.in

Regards
Dhinesh
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/j2se/1.3/docs/api/java/lang/System.html#in
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding to that, they mean for different purposes as the name indicates.

in - for getting inputs from user
out - for displaying any output to the user
err - for displaying any errors to the user

They can be given the handles of any such capable devices by obtaining the Stream to it. A stream is nothing but the channel which facilitates your flow of data.

By default, the input stream is given with the handle of keyboard through or using which the user can provide any inputs. The output and error streams are given with the handle of the Console (also known as "monitor").

For dealing with the different streams you may have a look at the available streams in java.io package.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!