khameed
Quiz por , criado more than 1 year ago

This Quiz aims to test the basic objective of inheritance

48
0
0
khameed
Criado por khameed aproximadamente 9 anos atrás
Fechar

Overriding

Questão 1 de 5

1

One of the main concepts in OOP is _____________ That allows to use the features ( methods )of one class in another?

Selecione uma das seguintes:

  • Libraries

  • Inheritance

  • polymorphism

  • abstraction

Explicação

Questão 2 de 5

1

Identify the child class in the java statement. public class Student extends Person{

Selecione uma das seguintes:

  • public

  • Student

  • Person

  • extends

Explicação

Questão 3 de 5

1

In Method Overriding the following the following conditions hold. Select more than one that apply

Selecione uma ou mais das seguintes:

  • Child class method must have same name as in the parent class.

  • Child class method must have same parameter as in the parent class.

  • Child class method must have same return type as in the parent class

  • Child class method must have different name as in the parent class.

  • Child class method must have different return type as in the parent class

  • Child class can have different method signature

Explicação

Questão 4 de 5

1

Inheritance enhances the ability to reuse existing code.

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 5 de 5

1

An object of a sub class can not be referenced by a variable of a super class type

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação