Extending the Object class

I’ve created a method I’d like to put in the Object class so it can be inherited by all the other classes. Is there a way to extend a base class?

Adding features to someone else’s base class would violate the securityrules of any object-oriented language, because you could then redefine anexisting method and break all of the classes deriving from this class.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: