access « serialize « Java I/O Q&A





1. Java serialization: access modifier for readResolve()    stackoverflow.com

Java documentation for the above says:

ANY-ACCESS-MODIFIER Object readResolve() throws ObjectStreamException; 
but I've often seen it defined as 'protected'. Similarly for:
ANY-ACCESS-MODIFIER static final long serialVersionUID = 42L; 
I've seen it defined as ...