What's the easiest way to persist java objects?
问题 Right now I have java program whose classes are currently POJOs and stored in volatile memory. These need to be persisted. As I understand it two popular choices are JDO and the Java Persistence API. For someone who know little about SQL, Torque, etc, which is the easiest way to add persistence to my program's data? 回答1: The traditional way to serialise to the filesystem is to use Java Serialisation. However you need to implement Serializable everywhere. A simpler solution is to serialise to