The document says that a non-serializable supertype needs a no-arg
constructor. It does not say it should be private. On the contrary it
says this constructor should be accessible. What the documentation means
about runtime is this
class A {
A() { <-- accessible only in current package
}
}
public class B extends A implements Serializable {
public B() {
}
}
No comments:
Post a Comment