Object Oriented Programming - I (3140705) MCQs

MCQs of Object oriented thinking

Showing 1 to 10 out of 64 Questions
1.
Method overriding is combination of inheritance and polymorphism?
(a) TRUE
(b) FALSE
Answer:

Option (a)

2.
Which of this keyword can be used in a subclass to call the constructor of superclass?
(a) super
(b) this
(c) extent
(d) extends
Answer:

Option (a)

3.
What is the process of defining a method in a subclass having same name & type signature as a method in its superclass?
(a) Method overloading
(b) Method overriding
(c) Method hiding
(d) None of the mentioned
Answer:

Option (b)

4.
Which of these keywords can be used to prevent Method overriding?
(a) static
(b) constant
(c) protected
(d) final
Answer:

Option (d)

5.
Which of these is correct way of calling a constructor having no parameters, of superclass A by subclass B?
(a) super(void);
(b) superclass.();
(c) super.A();
(d) super();
Answer:

Option (d)

6.
Which of these is supported by method overriding in Java?
(a) Abstraction
(b) Encapsulation
(c) Polymorphism
(d) None of the mentioned
Answer:

Option (c)

7.
Which of this keyword must be used to inherit a class?
(a) super
(b) this
(c) extent
(d) extends
Answer:

Option (d)

8.
Which of these is correct way of inheriting class A by class B?
(a) class B + class A {}
(b) class B inherits class A {}
(c) class B extends A {}
(d) class B extends class A {}
Answer:

Option (c)

9.
What is not type of inheritance?
(a) Single inheritance
(b) Double inheritance
(c) Hierarchical inheritance
(d) Multiple inheritance
Answer:

Option (b)

10.
Using which of the following, multiple inheritance in Java can be implemented?
(a) Interfaces
(b) Multithreading
(c) Protected methods
(d) Private methods
Answer:

Option (a)

Showing 1 to 10 out of 64 Questions