Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

program to write 1000000 lines  RSS feed

 
Noble Bhaskar Aswanapally
Greenhorn
Posts: 13
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have below program to print 1,000,000 lines
. But its printing 998976 only to file. Any issue in the code?



 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Writers should be flushed and closed when you're done with them.
 
Noble Bhaskar Aswanapally
Greenhorn
Posts: 13
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Any Writers should be flushed and closed when you're done with them.


Thank you very much Dittmer. I got correct output after closing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!