Reading and Writing Text Files
I'm very new to the Java language and have no idea how to do this. I've looked through a couple threads and saw some code dealing with BufferedReader/Writer and FileReader/Writer but still feel lost about them. I'm making a Hangman game for a class project and want to be able to save progress of the game. (More for the general knowledge of how to do it than for the sake of the game) What I need to save are ~30 Strings and ~5 integers. I'm totally lost on how to do this. Would it be easier to include it in the class containing the bulk of the game code, or make a separate class? How do I reference the correct files - do I need to have the directory name in the arguments or will it save/pull from the same directory as the game is? When I publish the program, how will it work then? I'm very ignorant as to this and so is my teacher and she has no time to look it up for me. Thanks in advance to whoever can help me.