Question from the Java test

What interface should a class implement to be serializable?

Hard

The following class implements an Interface

import java.io.IOException
import java.io.ObjectInputStream
import java.net.Socket

public class MyClass implements InterfaceToFind {
    private String name = null;
    private transient Socket sock = null;
    private void readObject(ObjectInputStream inputStream) throws IOException,
ClassNotFoundException {
        System.out.println("readObject called");
        inputStream.defaultReadObject();
    }
}

What should it be ?

Author: Thomas De verdièreStatus: PublishedQuestion passed 2799 times
Edit
2
Community Evaluations
developer avatar
Auteur anonyme
02/07/2023
Question is in french... Please translate it...
developer avatar
Auteur anonyme
12/07/2023
Hi, sorry we're a bit behind on translations for some tests. Please stay tuned for upcoming changes.
developer avatar
Other
Sparkling Eric Evans
19/12/2023
I don't know French, I don't know French!!!