I have an List<Animal>
but in that list I have subclasses of Animal
such as Mammal
.
(Yes that is right; it is a school assignment, so don't be specific, just give me some pointers.)
I should persist it with [Serializable] interface and that is no problem, except when I shall read it back again, I have no idea what subclass the data came from when it's time for reviving the information.
So the question is, how do I store that information?