Abstract class and constructor
807569Jun 12 2006 — edited Jun 13 2006Hi all,
I am relatively new to Java and have some doubts on Abstract class and its constructor and subclass from it. Can someone help?
Q1. Can abstract class have constructor? As it cannot be instantiated, can it still have constructor?
Q2. I saw an example which has an abstract class and a subclass which extends from this abstract class. In the abstract class, there is a constructor with implementation. But in the subclass, the author only provide an empty constructor. My question is, when the subclass gets instantiated, will it execute the constructor in the abstract class?
Confused.
Message was edited by:
han