• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

My program is not reading the first Line of a text file..What could be the issue: Here is the code:

 
Ranch Hand
Posts: 155
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Can you please explain in more detail what the problem is?

Note that in line 38-40 you are skipping the first 4 lines of the file you are reading.
 
Stanley Mungai
Ranch Hand
Posts: 155
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper de Jong wrote:Welcome to the Ranch.

Can you please explain in more detail what the problem is?

Note that in line 38-40 you are skipping the first 4 lines of the file you are reading.



Thank you for the reply..I am converting a Text File an e-statement To pdf. The first Few lines are the header and even there the first Line is getting skipped. The loop at line 38-40 is for reading a particular line(the account number) so that I can use the first two and the Last two digits as the password for the Pdf Document. The document is converting fine But the account number which is the 5th Line is not being read by the program. In the other loop at 97-99, the program is not reading a line (line number 20). I hope I have made myself clear this time. I am reading sections of the text File and everytime I read a certain section, the first Line of that section is getting Skipped. For example the details of the e-statement start from line 20. Please help.
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic