save game-- how to

Hello all, i have been wanting to implement a save game feature for my jigsaw puzzle but my mind is totally blank on this one.
my time is crazily limited and i would like your opinion on how i can get it done or what technique i may use.

the data that i need to save consist of an array of Object + an image file.
how can i save these ??

Look into serializing if you need to store Object’s, it’s pretty simple.

http://www.tutorialspoint.com/java/java_serialization.htm

You could do that, or you could look up JSON serialization or use Kryo; both are much more robust than java’s default method, which saves the actual class, and thus breaks all save games if you change anything.

Alternatively you could write your own format, which could use JSON internally, plus perhaps a block of PNG image data that can be read back out with ImageIO, but since your time is limited and you don’t seem to be experienced with this subject, I recommend using a pre-existing solution.

Serialization seems the easiest route to me. It’s prettyeasy to figure out and not too tough to implement if you code with it in mind.

Use JSON or XML or Parser101 to save simple data.

Save Images using ImageIO and link image paths to images in your save file.

Like others have said, serialize your objects. Don’t think this is the only way.

For instance a simple settings class can just read numbers from a text file. 1s and 0s for toggle options and that.