I am working on an application that has to serialize objects to a file for use later. There are multiple threads calling method writeObject
(for different objects, same file) concurrently. Is the method thread-safe? Do I have to synchronize the write operation in application code?
For example: Thread 1 serializes object A, Thread 2 serializes object B. If I didn't synchronize them, would A and B get mixed up with each other in the file? Thanks!