What is object serialization?

前端 未结 14 2159
长发绾君心
长发绾君心 2020-11-21 23:23

What is meant by \"object serialization\"? Can you please explain it with some examples?

14条回答
  •  名媛妹妹
    2020-11-22 00:03

    I liked the way @OscarRyz presents. Although here i am continuing the story of serialization which was originally written by @amitgupta.

    Even though knowing about the robot class structure and having serialized data Earth's scientist were not able to deserialize the data which can make robots working.

    Exception in thread "main" java.io.InvalidClassException:
    SerializeMe; local class incompatible: stream classdesc
    :
    

    Mars's scientists were waiting for the complete payment. Once the payment was done Mars's scientists shared the serialversionUID with Earth's scientists. Earth's scientist set it to robot class and everything became fine.

提交回复
热议问题