Java FileReader ClassJava 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 declarationLet's see the declaration for Java.io.FileReader class: Constructors of FileReader class
Methods of FileReader class
Java FileReader ExampleIn this example, we are reading the data from the text file testout.txt using Java FileReader class. Here, we are assuming that you have following data in "testout.txt" file: Welcome to javaTpoint. Output: Welcome to javaTpoint. Next TopicJava BufferedWriter Class |