How to Serialize an ArrayLIst in java without getting errors?

前端 未结 1 1793
失恋的感觉
失恋的感觉 2021-01-24 01:57

I am just trying to output a previously created ArrayList to serialise it for future storage.

but when I attmept to do so I get the runTime error \"notSerialisableExcept

1条回答
  •  礼貌的吻别
    2021-01-24 02:34

    ArrayList isn't the problem; your Department object is.

    You need to implement the Serializable interface in that object.

    0 讨论(0)
提交回复
热议问题