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.


On Jul 13, 2:19 am, Alex <[email protected]> wrote:
> Dear Programmer:
>  
> Home Page > Learning the Java Language > Interfaces and Inheritance  > 
> Abstract Methods and Classes
>  
>  
> "An abstract class is a class that is declared abstract—it may or may not 
> include abstract methods. Abstract classes cannot be instantiated, but they 
> can be subclassed. "
>  
> For anything to work the object has to be instantiated.  This means it goes 
> from the java file which is just basically text commands into a class file 
> which is the byte code the machine will use to make the object.
>  
> Not to sure how subclassing is getting us the abstract class to become an 
> object.
>
> JKid314159
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to