I have a question regarding the class objectOutputStream and its method writeObject().
If only Serializable objets can be written in the method writeObject(), why does the method accept any kind of object? I know it will throw a runtime exception if the object is not serializable, but why can't it throw a compile time error?
Weird.....