I know from school that it's impossible to override a private method. Despite that, it seems that redefining the methods writeObject and readObject in a Serializable class, they act as overriden public/protected methods.
private void writeObject(java.io.ObjectOutputStream out)
throws IOException {
}
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException {
}
I don't know the implementation of serialization in the JVM... but this looks as a dirty trick to make the things working.
Am I right, or am I missing something?