Hello Iv made a game in java and I'm trying to save the current state of the game(score, lives remaining etc) and the high scores.
I know ill have to go about this by saving to a text file but the are a lot of ints and strings ill have to save, so is there a way to just input the the names of the variables instead of their actual value in the writing method?
But still have their value written on the text file?
And i guess each value would be written onto its own line so it is easy to parse the values back off the text file.
I was just wondering if someone could write an example method of something like this, because I'm struggling to find an example like this on stack overflow.
would be much appreciated
Cheers
I know ill have to go about this by saving to a text file but the are a lot of ints and strings ill have to save, so is there a way to just input the the names of the variables instead of their actual value in the writing method?
But still have their value written on the text file?
And i guess each value would be written onto its own line so it is easy to parse the values back off the text file.
I was just wondering if someone could write an example method of something like this, because I'm struggling to find an example like this on stack overflow.
would be much appreciated
Cheers