1
votes

From the Serialization documentation

A Serializable class must do the following:

  1. Implement the java.io.Serializable interface.
  2. Identify the fields that should be serializable (Use the serialPersistentFields member to explicitly declare them serializable or use the transient keyword to deno nonserializable fields.)
  3. Have access to the no-arg constructor of its first nonserializable superclass.

What is the premise behind the third point above?

1

1 Answers

3
votes

What is the premise behind the third point above?

So that the non-Serializable base classes can be initialized to a known state that can be controlled to some extent by the programmer. It's just a design decision.