Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java Language
Expertise: Beginner
Jul 23, 1997

Extending the Object class

Question:
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?

Answer:
Adding features to someone else's base class would violate the security rules of any object-oriented language, because you could then redefine an existing method and break all of the classes deriving from this class.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date