Syntax error What is the difference between System.out, System.in and System.err streams in Java?

What is the difference between System.out, System.in and System.err streams in Java?



All the programming languages provide support for standard I/O where the user's program can take input from a keyboard and then produce an output on the computer screen. Similarly, Java provides the following three standard streams:

  1. Standard Input: This is used to feed the data to user's program and usually a keyboard is used as a standard input stream and represented as System.in.
  2. Standard Output: This is used to output the data produced by the user's program and usually a computer screen is used for standard output stream and represented as System.out.
  3. Standard Error: This is used to output the error data produced by the user's program and usually a computer screen is used for standard error stream and represented as System.err.
Updated on: 2019-07-30T22:30:20+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements