5
votes
4answers
485 views

Java serialization - advantages and disadvantages, use or avoid?

Serialization is used for persistence in Java. It may be okay to persist a few objects using serialization. But, for a large number of objects, ORM, Database etc might be better. It seems that ...
-1
votes
1answer
166 views

Serializing two or more Objects in Java [closed]

Here I am creating a HashMap, adding it to a list, then serializing this list. Then closing the ObjectOutputStream and FileOutputStream. Then reopening the ObjectOutputStream and FileOutputStream and ...
6
votes
2answers
2k views

What happens if we serialize and deserialize two objects which references to each other?

To make it more clear, this is a quick example: class A implements Serializable { public B b; } class B implements Serializable { public A a; } A a = new A(); B b = new B(); a.b = b; b.a = a; So ...