Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void loadData(String[] answerKey, String[] studentID, String[] studentAnswers) throws IOException
- {
- BufferedReader reader = new BufferedReader(new FileReader("C:\\VHS\\quiz.txt"));
- StringTokenizer tokenizer;
- String line = "";
- int count = 0;
- // Start reading entries all the way to the end of the file
- answerKey[0] = reader.readLine();
- line = reader.readLine();
- while (line != null)
- {
- tokenizer = new StringTokenizer(line);
- studentID[count] = tokenizer.nextToken();
- studentAnswers[count] = tokenizer.nextToken();
- count++;
- line = reader.readLine();
- }
Add Comment
Please, Sign In to add comment