Input Output Streams in Java || Lesson 67 || Java Programming || Learning Monkey ||

Publié le: 11 août 2023
sur la chaîne: Learning Monkey
213
1

Input Output Streams in Java
In this class, We discuss Input Output Streams in Java.
The reader should have proper basics on object-oriented concepts. Click Here.
Where are we getting the input data when we run the Java programs?
Sometimes we need to read the hard disc and network interface card data.
Java virtual machine JVM will handle the connections to input-output devices.
Whenever the JVM is on, it will create input and output streams.
The below diagram gives an idea of streams.
We need to read the data from the input and output streams to our program.
Which classes are used to do the reading and writing operations?
Two types of streams are available.
1) Byte stream
2) Character stream
Byte stream will read or write the data in the form of bytes.
Character stream will read or write the data in the form of characters.
The classes available in Java to read and write the byte streams are the inputstream and outputstream.
Similarly, the classes for character streams are reader and writer.
The above four classes are abstract.
The above class documentation is available on the oracle website.
The inputstream class is in java.io package.
The Java inbuilt packages provided many sub-classes to the super class inputstream.
Check the documentation for methods available in inputstream class.
Class x extends inputstream
{
int read()
{
}
}
We can not create an object for inputstream class. But we can create for class x.
In our last class, we discussed the concept of a superclass variable that can refer to subclass objects.
Inputstream ob = new x();
We are using the above concept.
The concept of a superclass variable can refer to a sub-class object used much in our next classes.
Link for playlists:
   / @learningmonkey  


Link for our website: https://learningmonkey.in

Follow us on Facebook @   / learningmonkey  

Follow us on Instagram @   / learningmonkey1  

Follow us on Twitter @   / _learningmonkey  

Mail us @ learningmonkey01@gmail.com


Sur cette page du site, vous pouvez voir la vidéo en ligne Input Output Streams in Java || Lesson 67 || Java Programming || Learning Monkey || durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Learning Monkey 11 août 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 213 fois et il a aimé 1 téléspectateurs. Bon visionnage!