posted 16 years ago
No, that's not true. If you declare your class Serializable, it can be serialised, even if its superclasses are not declared Serializable. The most obvious example of this is that all classes inherit java.lang.Object, and that's not Serializable!
However, you do have to give consideration to what your superclasses are, before you declare your class Serializable. Some classes are clearly unsuited to serialisation. Unfortunately, I don't know of any way of declaring your class unserialisable. Sounds like an application for an annotation?
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.