• Read From File In Java

    To read a text file, we use FileReader and wrap it in a BufferedReader.

    In the below example, we read a file named “FileToRead.txt” which is located in my local system and output the file line by line in my eclipse console.

    Sample Program:

    Read More: Java Tutorial

    Sharing is caring.

    Share on facebook
    Facebook
    Share on twitter
    Twitter
    Share on linkedin
    LinkedIn

    Like This Post?

    We have a lot more where that came from?

    We only send really good stuff occasionally, promise.

    Rajkumar SM

    Leave a Comment

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

    Scroll to Top
    API Testing eBook

    DOWNLOAD FOR FREE