java - Does serialization apply to other object instances that are not defined as serializable? -


if have main class, serializible , create instances of other classes (no inheritance) not defined being serializible, state of classes preserved along state of main class, if not static? know constructors of other objects bypassed, states? , yes, did search , google, came out empty handed, hope nice gent clear me.

if there reference object not serializable, notserializableexception thrown.

when traversing graph, object may encountered not support serializable interface. in case notserializableexception thrown , identify class of non-serializable object.

source: https://docs.oracle.com/javase/7/docs/api/java/io/serializable.html

you may work around it, answers on suggest, e.g. java serialization non serializable parts


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -