Originally posted by JosAH
Java classes comments
Collapse
X
-
Originally posted by r035198xAnd I've just moved from Vista to Fedora as well (Not that I'm complaining about the move of course).
One question is still there to be answered....Wha t is contructors doing in abstract class if we cant create object of that.....sugges t me on that one....plzz
Thanks and regard,
madhoriyaComment
-
Originally posted by madhoriya22hi r035198x/Jos,
One question is still there to be answered....Wha t is contructors doing in abstract class if we cant create object of that.....sugges t me on that one....plzz
Thanks and regard,
madhoriya
very well able to instantiate an object from a concrete subclass. A class
constructor always (implicitly) calls its superclass' constructor so an abstract
class needs at least one constructor as well.
kind regards,
JosComment
-
Originally posted by madhoriya22hi r035198x/Jos,
One question is still there to be answered....Wha t is contructors doing in abstract class if we cant create object of that.....sugges t me on that one....plzz
Thanks and regard,
madhoriyaComment
-
Originally posted by r035198xRemember that you can call a constructor in an immediate superclass using the super keyword. So basically a constructor in an abstract class is invoked from extending classes' constructors. Note that public constructors in abstract class are not needed since only extending classes can access them
What happen to more discussions in free java classes.....eag erly waiting for that....
Thanks and regards,
madhoriyaComment
-
Originally posted by madhoriya22Thanks for ur suggestions.... ..but still I am trying to understand it......I vil catch u later... If I have another doubts.
What happen to more discussions in free java classes.....eag erly waiting for that....
Thanks and regards,
madhoriyaComment
Comment