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

Java 8Object Oriented ProgrammingProgramming

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.
raja
Published on 08-Feb-2018 14:00:50
Advertisements