The super keyword

Could you please tell me the significance of the Super Keyword.

hi @dktrip,
Super is a special keyword of java which in this case is used to invoke parent class constructor.See your DynamicStack class is extending the StackUsingArray class and so StackUsingArray is parent class.So here super keyword is used to call the constructor of StackUsingArray class which in turn creates a array of size=capacity.

So after mwntioning the super keyword do we then to mention the constructor’s name in the parent class which we want to extend?

no we do not …The class we are extending is the one that super refers to .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.