阅读背景:

为什么java.util.Optional不是Serializable,如何使用这些字段序列化对象

来源:互联网 

The Enum class is Serializable so there is no problem to serialize object with enums. The other case is where class has fields of java.util.Optional class. In this case the following exception is thrown: java.io.NotSerializableException: java.util.OptionalThe Enum class is Serializable so there is no p




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: