Quiz 3 - Bce Rep

9 Questions | Attempts: 81
Share
SettingsSettings
Please wait...
  • 1/9 Questions

    To explicitly call a method from super class we use keyword; 

    • Super
    • Implements
    • Instanceof
    • This
Please wait...
About This Quiz

Online quiz BCE repeaters

Quiz 3 - Bce Rep - Quiz

Quiz Preview

  • 2. 

    Which of the following is true for Method Overriding ;

    • Static binding occurs in Method Overriding

    • Late or Dynamic binding occurs in Method overriding

    • Both static binding and Late Binding occur in method overriding

    • No binding occurs in method overriding

    Correct Answer
    A. Late or Dynamic binding occurs in Method overriding
  • 3. 

    Method overloading is an example of Dynamic Polymorphism

    • True

    • False

    Correct Answer
    A. False
  • 4. 

    In polymorphism, we create object of a subclass and initialize it by assigning a reference of a super class.

    • True

    • False

    Correct Answer
    A. False
  • 5. 

    Methods and Fields from a Super Class can only be visible in a Sub class when they are;

    • Public

    • Private

    • Protected

    • Both Public or Protected members are visible

    Correct Answer
    A. Both Public or Protected members are visible
  • 6. 

    Given the following code;public class Employee{                                 public abstract String toString();}which of the following statement is true 

    • The keywords public and abstract cannot be used together

    • The method toString() in class Employee must have a body

    • You must add return statement inside the body of tostring method

    • Class Employee must be define abstract

    Correct Answer
    A. Class Employee must be define abstract
  • 7. 

    In an is-a relationship, an object of a subclass can also be treated as an object of its superclass.

    • True

    • False

    Correct Answer
    A. True
  • 8. 

    Which of these is not a correct statement?

    • Every class containing abstract method must be declared abstract.

    • Abstract class defines only the structure of the class not its implementation.

    • Abstract class can be instantiated by new operator.

    • Abstract class can be inherited.

    Correct Answer
    A. Abstract class can be instantiated by new operator.
  • 9. 

    Suppose A is an abstract class and B is a subclass of A. Both A and B have a default constructor. which of the following is true;1. A a = new A();2. A a = new B();3. B b = new A();4. B b = new B();

    • 1 and 2

    • 2 and 3

    • 3 and 4

    • 2 and 4

    • 1 and 3

    • 1 and 4

    Correct Answer
    A. 2 and 4

Quiz Review Timeline (Updated): Mar 20, 2022 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Nov 19, 2014
    Quiz Created by
    Aamirakbar
Back to Top Back to top
Advertisement