Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CSVWriter not writing the first line in new file

 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the following code which I expect to run on following csv file and print A,B,C in new file yourfile.csv. Somehow I see that I am entering a null record. Could anybody tell me whats wrong with following code?
ooordered.csv file
B,A,C
e,2,r
a,1,e
q,3,w

Code:

 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
resolved..writer.close() was missing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic