• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Round-up game Question

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the rules round up game #335
It says "constructors are not inherited" because "subclasses do not get a constructor from the superclass".
Can someone explain this? I thought subclasses get the "super()" constructor by default, if no constructor is given in the sub-class.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, constructors don't get inherited. The super() is a call to the default ctor of the immediate parent of a class.
...It says "constructors are not inherited" because "subclasses do not get a constructor from the superclass"....
...and the sky is blue because blue is the color of the sky...

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, I should have mentioned that a call to super() is implicit if you don't make the call to it or to any other, overloaded parent-class ctors.
I hope that helps a bit more!
reply
    Bookmark Topic Watch Topic
  • New Topic