I read online that serialization can be omitted for derived objects by declaring them as transient. But, in case of linked list the links are memory references between objects. So, should I convert it to array and store the array representation?
I read online that serialization can be omitted for derived objects by declaring them
Share
Here’s how Java serializes
LinkedList: it fetches all elements and writes them to theObjectOutputStream, together with the size. And of course declares theheaderentrytransientSee the
writeObjectandreadObjectmethods ofLinkedList: