推荐答案
从广义上讲,序列化是Java为开发人员提供持久保存状态的方式任何对象到持久性存储的情况。
Serialization, in broad terms, is the way Java provides developers to persist the state of any object to a persistent store.
如果开发人员想要由于某种原因将其编码类的实例持久化到后备存储,那么该类需要声明为实现Serializable。
If a developer wants that for some reason instance of his coded class should be persisted to a backing store, then the class needs to be declared as implementing Serializable.
上述代码表示丈夫和妻子之间的一对一关系。这基本上意味着每个妻子与一个丈夫有关,每个丈夫与一个妻子有关。 :-)同样在上述关系中,丈夫是[实体 - 关系条款]中的关系的主人,这就是为什么妻子说它被丈夫映射/关联到丈夫而不是相反的方式。这意味着丈夫识别其妻子,而不是相反。
The above code represents a One to One relationship between a Husband and a Wife. Which basically means that each wife is related to one husband and each husband is related to one wife. :-) Also in the above relationship, the Husband is the master of the relationship [in Entity-Relationship terms] and that is why Wife says that it is mapped/associated to Husband by the Husband and not the other way around. Which means Husband identifies its wife and not the other way around.
更多推荐
为什么一个类实现了Serializable接口?
发布评论