Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

My FileOutputStream is not writing data to a file

 
Nate Benton
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My program creates a file but cannot write to it and i cannot figure out why.
How can i fix this code so that the FileOutputStream writes the String "Output" to the file HighScore.


 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change



to



Your code writes to a file named "ScoreFile".

By the way lines 8-13 of your posted code are unnecessary, FileOutputStream does those things automatically.
 
Nate Benton
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much, I did not know that it did that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic