When a sub class inherents a super class it intherents the protected/public Attributes/methods , so i get why we call the super constructor in the sub constructor to initialize the attributes inherited. But if the attributes in the super class were private they won’t be inherited so i don't get why we should call the super constructor inside the sub constructor to initialize them? What I have tried: The code implementation was Super class with private attributes sub class The sub class constructor calls the super class constructor that initialize the private attributes in super class So i tried to execute the code without calling the super constructor in sub constructor and it didnt work out
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)