I want to do something like a high scores list in my game application.
I was wondering, if I can load a picture file into my game, why can't I add a text file?
How would I go about having my program add text to a text file, and is there a way for it to read the last 10 scores entered and have an algorithm determining whether or not to add the new score to the list?

Thanks in advance!

Java has several classes and methods for reading and writing files. The simplest for reading is the Scanner class.
For writing text files, there are several choices like PrintWriter or BufferedWriter.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.