title: How do I read and write to a file using Scanner?
body: <p>I'm trying to make a simple database where the person can choose either to add a new name or to list the current ones, and the program has to save these values in a text file. When they open the program again, it will load from the text file and already have some names listed. If the text file doesn't exist, it will create one. I know how to do most of things that I'll need, except how to read and write from a file (this is an expansion on a previous program, which only stored the names temporarily). I looked around on google but couldn't find anything that would work well/I can understand well. Could anyone help and explain how to, first, create and/or read from a file, and then write to it? Sorry if this seems like a dumb question, pretty new to Java :P</p>