Core java tutorial for beginners
A tutorial blog which explains different core concepts related to Java along with programming examples
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.
Java Programming » IO » Input and Output in Java Programming
Suryateja Pericherla Categories: IO. No Comments on Input and Output in Java Programming
3
(2)

In this article we look at introduction to input and output in Java programming language.

 

Almost all programs in Java require some input which is processed by the program and generates some output. Java provides an API in the form of packages namely java.io, and java.nio for dealing with I/O. Both these packages contain various classes which can be used to read and write data to various sources like a console, file, peripheral device, or a socket.

 

Java handles transfer of data in the form of streams. A stream is a flow of data which is composed of bytes. So, the data is transferred continuously as a flow. Java creates three streams automatically which are attached to the console. They are:

  • out: Standard output stream
  • in: Standard input stream
  • err: Standard error stream

 

How useful was this post?

Click on a star to rate it!


Subscribe to our monthly newsletter. Get notified about latest articles, offers and contests.


We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Note: Do you have a question on this article or have a suggestion to make this article better? You can ask or suggest us by filling in the below form. After commenting, your comment will be held for moderation and will be published in 24-48 hrs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Facebook
Twitter
Pinterest
Youtube
Instagram