I\'ve been learning how to use Serializable
.
I know if I create a class \'A\' with different variables who implements Serializable
and I ad
If you implement a class which has to be serializable, you also have to provide a method which does the serialization in the same class.
You cannot rely on Object to be able to guess what your class needs to be successfully serialized and deserialized. Think of working variables of your class for example which do not need to be serialized, Object would not be able to differentiate those from the important fields.