• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bufferedReader.readLine() random order of lines ?

 
Miran Cvenkel
Ranch Hand
Posts: 196
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why this is reading lines of text in completely randome order, not from top to bottom ?

 
Miran Cvenkel
Ranch Hand
Posts: 196
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahh, forget that, my mistake.
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are mistaken. Since you are reading from a Reader which is just a stream of chars it must read from 'top to bottom'.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Miran!

Can you show us your solution, champ? This can be helpful to other people that run into the same mistake as you in the future.
 
Miran Cvenkel
Ranch Hand
Posts: 196
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just had one extra



before while so it started reading at second line.
Showing that in some text boxes further confused things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic