how does polymorphism works within the constructors
October 9, 2012 Leave a comment
First of all it is not good practice to call any instance methods inside the constructor, if we cannot avoid then do as little as possible.
What happens:
Assume we call a over-ridden method within the constructor and if that method manipulates data that has not been initialized (because constructor is not yet completed) yet then it will lead to disaster.
The only safe methods inside the constructor to call are final methods in base class.
Recent Comments