Saving/Loading. Help.

I am writing a text adventure and need help figuring out how I can save the player’s variables so he can continue. How do I do this? I tried writing/reading text files and couldn’t figure it out.

Thanks so much.

http://math.hws.edu/javanotes/ Here is a free online book that I found a while back, it’s pretty in depth. What you want is in chapter 2.