// Serializable/externalizable specific import java.io.*; class a implements Serializable { private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { if (stream == null) throw new IOException(); if (stream == null) throw new ClassNotFoundException(); } private void readObjectNoData() throws ObjectStreamException { if (this == null) throw new ObjectStreamException(){}; } private Object readResolve() throws ObjectStreamException { if (this == null) throw new ObjectStreamException(){}; return null; } private Object writeReplace() { return null; } private void writeObject(ObjectOutputStream stream) { if (stream==null) return; } } class b { private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { if (stream == null) throw new IOException(); if (stream == null) throw new ClassNotFoundException(); } private void readObjectNoData() throws ObjectStreamException { if (this == null) throw new ObjectStreamException(){}; } private Object readResolve() throws ObjectStreamException { if (this == null) throw new ObjectStreamException(){}; return null; } private Object writeReplace() { return null; } private void writeObject(ObjectOutputStream stream) { if (stream==null) return; } } //////////////////////////// abstract class e implements Externalizable { } class eImpl extends e { public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { } public void writeExternal(ObjectOutput out) throws IOException { } } class eImpl1 extends e { private eImpl1() {} public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { } public void writeExternal(ObjectOutput out) throws IOException { } } class eImpl2 extends e { public eImpl2(int i) { System.out.print(i); } public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { } public void writeExternal(ObjectOutput out) throws IOException { } }