Consider the "java.io.Serializable" interface. It has no methods to implement, but it tells the system that it's OK to serialize instances of any class that implements it. In other words SUN decided to go with an "opt in" mechanism for determining serializability (is that a
word?).
Because of reflection and introspection, the JVM is perfectly capable of figuring out how to serialize any *normal* class, so unless you need special consideration, you don't have to supply any code to tell it how to serialize your object. Hence all you have to do is add the "implements java.io.Serializable" and everything is taken care of for you.
In JDK 1.5 SUN will include JSR 175 (Custom Metadata) which defines a mechanism for tagging classes with metadata that's available to the JVM. I don't see SUN doing away with java.io.Serializable, but in the future this may help do away with marker interfaces.
[ October 23, 2003: Message edited by: Wayne L Johnson ]