Pergunta de entrevista da empresa Tech Superior Consulting

How does inheritance work in Java?