I’m trying to serlialize a class I created, it’s not working and for some reason I can’t see the entire exception when I try to log it (in android), but that’s not important…
I have a suspicion what it might be…
I haven’t done java programming in many years… but now I seem to remember perhaps serialization is not completely automatic?
could someone please tell me what I have to do? point me in the right direction?
I have a class AccountList, I implemented serializable… it contains an arraylist of class Account … I implemented serializable on AccountList and Account.. I mean just declared “implements Serializable”
but now I think I vaguely remember that if there is something like arraylist inside this AccountList class, then I must actually write some serialization code by overriding some methods in AccountList ?
what should I do?
Serialization is automatic as long as all the objects involved are
Serializable. There are several mechanisms for tweaking how it works, but those are not likely to be relevant for you. Have a look atAccountandAccountListand make sure all their member variables areSerializabletoo. And change your exception-handling code to improve the error display!