Tuesday, 6 October 2015

Why writeObject and readObject are private methods?




We don't want these methods to be overridden by subclasses. Instead, each class can have its own writeObject method, and the serialization engine will call all of them one after the other. This is only possible with private methods (these are not overridden).

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...