The following code is part of my Flash card program where the user can have two text files, one called questions and the other called answers, and then the program will display the questions and the user can see if he can get the right answer.
This is just the loading of the cards, not the whole program. The problem is not every line in the text file is being loaded. Try it yourself using two text files with the same number of lines, and if the text file was something like,
word1
word2
word3
word4
The ArrayList qlines would be something like
word1
word2
word4
For each round in the loop, you are reading from the buffques twice - once in the while condition, and once in the qlines.add() line. Take the second one out and store tempstr into qlines.
Steve
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Program not correctly reading from a text file