• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Subclass 'earns' superclass method ?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its not so difficult to find J2SE books saying that a subclasses 'earns' visible methods from an inherited superclass.

On my way studying for SCJP i found this terminology a bit diferent from what the concept of method inheritance
appears to be.
I think the right way to talk about inheritance is to say that a subclass just can make use of visible super methods, either
for subscribing or for using method's code.


Is it right to say that stuff ??
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not heard the term 'earn' yet.

The correct terminology would be 'Class B inherits behavior from Class A'.
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That "earn" thing sounds cute. It actually does happen. Since the subclass extends a superclass, it ought to get those visible methods in order to extend the functionality.
But again, it's better to say 'inherits'
 
Ranch Hand
Posts: 537
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well i think earns is a wrong way to specify the inheritance.Subclasses are going in to a competition to earn the parental status of the superclass. Subclass is not doing anything special to earn the methods but actually it gets by default as the methods are behaviors from its superclass. So inherits is the right way to show the in inheritance.
 
and POOF! You're gone! But look, this tiny ad is still here:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic