Learn Java Tutorial for Beginners, Part 43: Reading Files with FileReader

preview_player
Показать описание
In this video by Quordnet Academy for the series Learn Java Tutorial for Beginners how to use Reading Files with FileReader have been discussed.
If you would like to discover even more about java programming tutorial or the java complete course I advise you to check out the playlist :

Java FileReader Class
Java FileReader class is used to read data from the file. It returns data in byte format like FileInputStream class.

It is character-oriented class which is used for file handling in java.

Java FileReader class declaration

public class FileReader extends InputStreamReader
Constructors of FileReader class
Constructor Description
FileReader(String file) It gets filename in string. It opens the given file in read mode. If file doesn't exist, it throws FileNotFoundException.
FileReader(File file) It gets filename in file instance. It opens the given file in read mode. If file doesn't exist, it throws FileNotFoundException.
Methods of FileReader class
Method Description
int read() It is used to return a character in ASCII form. It returns -1 at the end of file.
void close() It is used to close the FileReader class.


Java FileReader Example


public class FileReaderExample {
public static void main(String args[])throws Exception{
int i;
}
}

Welcome to javaTpoint.
Output:

Welcome to javaTpoint.

Possibly if you have doubt comment below and let me understand what else I can help you with information in java.This playlist is a full fledged java programming for beginners and java tutorial for beginners which is given above.
Please share with your friends the video to assist other people looking for java programming tutorial or object oriented programming java .
To never miss an update from or channel hit the subscribe button first and if already subscribe hit the bell icon.
1.Follow us on INSTAGRAM for Interesting posts
2.Follow us on LINKEDIN for interesting content on different aspects
3.Don't forget to like our FACEBOOK to get the most out of it
4.Follow us on twitter to get a mix of all
5.If you want to get us on TUMBLR please then click on the link given below
6.Do join our OFFICIAL Telegram for notes of different things
7.For get job update regularly both private and government do join this telegram channel
#quordnetacademy, #java_tutorial_series, #javatutorialseries
Рекомендации по теме