RNBFFBB
RNBFFBB
//fis tells what is the file type where records are stored
FileInputStream fis = new FileInputStream("studentinfo.txt");
//dis converts the content of the file into data
DataInputStream dis = new DataInputStream(fis);
//br reads the data that will be stored in an array
BufferedReader br = new BufferedReader(new InputStreamReader(dis));
while(true)
{
System.out.print("Enter the student no.: ");
studno = sc.next();
/*
this will reset the position of the pointer to the beginning
of the data/array to prepare for another transaction
*/
fis.getChannel().position(0);