They can do what ever you program them to do, is just that you can not create an object with it directly.
On Jul 13, 12:38 pm, Maurizio Marrocco <[email protected]> wrote: > Hello, > I have a doubt regarding the constructors of an abstact class. Do they do > something or they only call the constructors of its superclass? > > Regards, > Maurizio Marrocco > > On Mon, Jul 13, 2009 at 10:26 AM, Georgiana > > > > Lungu<[email protected]> wrote: > > > Well, first of all, running the constructor of a subclass calls the > > constructors of its parents, so creating an instance of a subclass > > makes the constructor of the abstract class run. Secondly, if you have > > any variable that refers to the type of the inherriting subclass, it > > still passes the is-a test for the tyep of the abstract parent class, > > so it is, implicitly an object of that type and you can use it to call > > abstract classs' methods and fields.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
