I know I need to implement Serializable in the classes which neet to be set to the Clipboard. But for the Objects with objects as attributes in them, do I need to implement Serializable on all the object attributes. And does it follow that I need to implement Serializable in the Objects within object attributes?
For example
TestObject implements Serializable
{
private Object o = new Object();
}
Object o implements Serializable
{
private AnotherObject ao = new AnotherObject()
}
does “AnotherObject” have to be serializable too?
Yes every object you want to serialize should implement Serializable (even though it is part of another serializable object)