Java: What can and what can't be serialized?

前端 未结 9 1007
Happy的楠姐
Happy的楠姐 2020-12-25 11:48

If the Serializable interface is just a Marker-Interface that is used for passing some-sort of meta-data about classes in java - I\'m a bit confused:

After reading t

9条回答
  •  滥情空心
    2020-12-25 12:31

    When you are talking about NotSerializableException it is throw when you want to serialize an object, which has not been marked as Serializable - that's all, although when you extend non serializable class, and add Serializable interface it is perfectly fine.

    There is no data that can't be serialized.

提交回复
热议问题