Java Program to read in a file line by line.

First create a text file named javaCode.txt and write something on that text file.
Save that text file within the same directory.
Following is written under txt file

javaCode.txt

Welcome to Simple2Code.
Let Start
first tutorial
second Program

Output: