java file read/write question

  • From: Alex Parks <mehgcap@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Mon, 05 Nov 2007 12:12:56 -0500

Hi all,

I did a simple dice-rolling game for a project in the first java class I have taken. We don't have to, but I would like to know how I can use a score.txt file to keep a high score. I know about the comparison of the file's content to the current score and such, but how can I read from and, if the current score is higher, write to score.txt? I think I can use Scanner to read, but I am not sure how to do it, and I have no clue how to write. I use Notepad as my editor and compile at the command line. Thanks for any help.

Have a great day,
Alex
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: