How to create persistent object in Java – Education Career Blog

Can you give me an example of creating persistent object in Java. thanks


public class MyClass implements Serializable


Depending on where you want to persist the object, take a look at:

  • JPA, for relational database
  • JDO (Java Data Objects, a more general persistence mechanism)
  • JAXB – XML serialization
  • or protobuf – binary serialization

Leave a Comment