// Open the file
FileInputStream file = new FileInputStream("studentfile.txt");
BufferedReader br = new BufferedReader(new InputStreamReader(file));
String nextLine;
//Read File Line By Line
while ((nextLine = br.readLine()) != null) {
// print the content from the file
System.out.println (nextLine);
}
//Close the input stream
br.close();