One should make sure that all the included objects are also serializable. If any of the objects is not serializable then it throws a NotSerializableException.
关注时代Java