How does Java's serialization work and when it should be used instead of some other persistence technique?

前端 未结 9 1011
失恋的感觉
失恋的感觉 2020-11-30 20:54

I\'ve been lately trying to learn more and generally test Java\'s serialization for both work and personal projects and I must say that the more I know about it, the less I

9条回答
  •  無奈伤痛
    2020-11-30 21:12

    Serializing means that you put your structured data in your classes into a flat order of bytecode to save it.

    You should generally use other techniques than the buildin java-method, it is just made to work out of the box but if you have some changing contents or changing orders in future in your serialized classes, you get into trouble because you'll cannot load them correctly.

提交回复
热议问题