Hey there im trying to read a .txt file line by line but somehow it only reads every second line..
try {
FileReader fr = new FileReader("file.txt");
BufferedReader br = new BufferedReader(fr);
while (br.readLine() != null){
println(br.readLine()); //method to print the line
}
}catch (FileNotFoundException e){}
This is what it should print:
stuff
stuff
stuff
more stuff
SAVED
LOADED
SAVED
LOADED
Instead it just prints this:
stuff
more stuff
LOADED
LOADED
I have no idea whats going on and could really use some help