Serialization of anonymous class in Java

前端 未结 4 1887
醉话见心
醉话见心 2021-01-12 12:59

Is it possible to searialize/desearialize anonymous class in Java?

Example:

ByteArrayOutputStream operationByteArrayStream = new ByteArrayOutputStrea         


        
4条回答
  •  南笙
    南笙 (楼主)
    2021-01-12 13:24

    Sure! In your case class Task should implement the Serializable interface.

提交回复
热议问题