[Logo]
Forums Register Login
Question about serialization
Hello

I have class implementing Serializable

and it have a data member of type Object.

As a plain java Object is not serializable so what will happen in this case?

Only this method will not be serialized or the entire class will not be serialized?

Vik
What happened when you tried it out?
 

Vivek S. kumar wrote:Hello

I have class implementing Serializable

and it have a data member of type Object.

As a plain java Object is not serializable so what will happen in this case?

Only this method will not be serialized or the entire class will not be serialized?

Vik



You mean to say, "Only this Object........."?

NotSerializableException will be thrown. Don't you try it?
 

Abimaran Kugathasan wrote:NotSerializableException will be thrown. Don't you try it?


Well, now he doesn't have to, because you flat-out told him. In general, we like to have people try things out on their own.
Sorry, I think, he tried it and couldn't solve this problem... really sorry...
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 615 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jan 16, 2018 16:18:41.