Phase: Implementation
In Java, explicitly define final writeObject() to prevent serialization. This is the recommended solution. Define the writeObject() function to throw an exception explicitly denying serialization.
Phase: Implementation
Make sure to prevent serialization of your objects.