mardi 26 juillet 2016

Java constructor of an abstract class

As far as I know (please correct me if I'm wrong) a class that is abstract cannot be instantiated. You can give it a constructor, but just can't call new on that class. If you call super in a subclass, the superclass constructor will run (and thus create an object of that class?) then how come you can actually call super in a subclass of an abstract class? I'm sure it has something to do with my misunderstanding about a constructor making an object...

Aucun commentaire:

Enregistrer un commentaire