I've used text files to store data about students
each line consists of student name, SSN, and score
This is the problem:Given SSN, search into the file and if you find matching read the current line from beginning to display such output
John F Smith:50.5
I've developed this class
but when the matching occur i cannot read the the current line from beginning
Can you help me in this???
I Hear I Forget, I See I Remember, I Do I Understand.
I would read the file line by line rather than use a Scanner. Look for the match in each line, and if you find one, you already have the line in a String variable. Also, you don't waste time trying to match an SSN with the other tokens, which may be names or scores.