Forums Register Login

Java Serialization

+Pie Number of slices to send: Send
Here it goes.

If we implement Serialize interface, then how many methods can we override.
+Pie Number of slices to send: Send
Welcome to JavaRanch.

I think you're confusing some concepts. Serializable is an interface, so a class can implement it, which means it needs to have implementations of all the methods declared in the interface. Note that in order to implement Serializable, no methods need to be implemented, because Serializable does not declare any.

The same class can also extend another class, in which case it can override any of the super-classes methods. How many that are depends on the super-class.
+Pie Number of slices to send: Send
Serializable is, what they call, a Marker Interface. Such an Interface does not have any methods that are to be implemented. It simply is a 'Marker' stating that the object is a "Serializable object". The Serialization logic is already known and you do not need to implement that.
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 862 times.
Similar Threads
Developing our own Exam Simulator?
DO GOD STILL EXIST IN THE WORLD
ejb-jar file 's content
chatting option
Outgrowing our server(s)!
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 22:54:23.