Buscar

What's the order of call of constructors in inheritance? a) First the constructor of the derived class is invoked and then the constructor of the...

What's the order of call of constructors in inheritance?


a) First the constructor of the derived class is invoked and then the constructor of the super class is invoked.
b) The constructors of both the derived class and the super class are invoked simultaneously.
c) First the constructor of the super class is invoked and then the constructor of the derived class is invoked.
d) The order of call of constructors in inheritance is undefined.

Essa pergunta também está no material:

23 pág.

Linguagem de Programação Java Universidade PaulistaUniversidade Paulista

💡 1 Resposta

User badge image

Ed Verified user icon

A ordem de chamada dos construtores na herança é a seguinte: a) Primeiro o construtor da classe derivada é invocado e depois o construtor da superclasse é invocado.

0
Dislike0

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais