This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • 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