we can also create reference of child class and object also in child class as: DynamicStack stack=new DynamicStack();
so why sir created the reference of parent class?
as, StackUsingArray stack=new DynamicStack();
is it for some specific reason or just normal?