Is there a reliable way to write the contents of a static object to disk when the program ends?
At the moment, I call a persist()
method on the static object at the end of each main() method that uses the static object. I wonder whether this can be done automatically.