• Post Reply Bookmark Topic Watch Topic
  • New Topic

First Character is missing while reading a Input Stream  RSS feed

 
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi this is my code




My text in file is :my birthday Hello World

but in out i see only:y birthday Hello World

Why is first charcter is missing here?


Thanks
 
Sheriff
Posts: 4289
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you're reading a character before the loop and at the top of the loop. The first read never gets printed.
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks knute
solved
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!