Quiz 3 - Bce Rep

9 Questions | Attempts: 81
Share

SettingsSettingsSettings
Quiz 3 - Bce Rep - Quiz

Online quiz BCE repeaters


Questions and Answers
  • 1. 

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

    • A.

      Public

    • B.

      Private

    • C.

      Protected

    • D.

      Both Public or Protected members are visible

    Correct Answer
    D. Both Public or Protected members are visible
  • 2. 

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

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 3. 

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

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 4. 

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

    • A.

      Super

    • B.

      Implements

    • C.

      Instanceof

    • D.

      This

    Correct Answer
    A. Super
  • 5. 

    Which of these is not a correct statement?

    • A.

      Every class containing abstract method must be declared abstract.

    • B.

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

    • C.

      Abstract class can be instantiated by new operator.

    • D.

      Abstract class can be inherited.

    Correct Answer
    C. Abstract class can be instantiated by new operator.
  • 6. 

    Method overloading is an example of Dynamic Polymorphism

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 7. 

    Which of the following is true for Method Overriding ;

    • A.

      Static binding occurs in Method Overriding

    • B.

      Late or Dynamic binding occurs in Method overriding

    • C.

      Both static binding and Late Binding occur in method overriding

    • D.

      No binding occurs in method overriding

    Correct Answer
    B. Late or Dynamic binding occurs in Method overriding
  • 8. 

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

    • A.

      The keywords public and abstract cannot be used together

    • B.

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

    • C.

      You must add return statement inside the body of tostring method

    • D.

      Class Employee must be define abstract

    Correct Answer
    D. Class Employee must be define abstract
  • 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();

    • A.

      1 and 2

    • B.

      2 and 3

    • C.

      3 and 4

    • D.

      2 and 4

    • E.

      1 and 3

    • F.

      1 and 4

    Correct Answer
    D. 2 and 4

Quiz Review Timeline +

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