How to serialize static data members of a Java class?

后端 未结 9 1923
孤城傲影
孤城傲影 2020-11-27 17:30

When we serialize objects, static members are not serialized, but if we need to do so, is there any way out?

9条回答
  •  孤街浪徒
    2020-11-27 17:53

    Static members belong to the class, not to the individual objects.

    You should reconsider your data structure.

提交回复
热议问题