Company not specifiedSeptember 2026
Interview question
A developer makes a copy of a large object consisting of different objects. Instead of deep cloning, the developer is advised to use serialization and modifies every class to implement a serializable interface. On reaching a singleton class, the following code is shown:
```
//start of class
private static WindowManager objectWindow = new WindowManager ();
private WindowManager ()
{
}
public static WindowgetInstance()
{
return objectWindow();
}
//end of class code
```
Which statement is correct about this singleton class?
A. Multiple instances of this class cannot be created in serialization.
B. The given code is correct for serialization.
C. A singleton class cannot implement serialization.
D. readResolve() should be implemented to implement the serializable interface.