Win a copy of Murach's Python Programming this week in the Jython/Python 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: 42970
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!