Domanda di colloquio di Capgemini Engineering

What is inheritance and its type and demonstrate it in a code.