OOP Concepts Quiz With Answers
OOP Concepts Quiz With Answers
Instructions
1. Encapsulation in Java is achieved using access modifiers like private, public, and protected. (True)
2. Inheritance allows a class to use the properties and methods of another class. (True)
3. Abstraction means exposing all details of a class to the outside world. (False)
4. The `final` keyword in Java is used to implement polymorphism. (False)
5. A class can implement multiple interfaces in Java. (True)
6. Constructors in Java have the same name as the class and do not return a value. (True)
7. Overriding means defining multiple methods with the same name but different parameters in the same
class. (False)
8. Java supports both compile-time and run-time polymorphism. (True)
9. The concept of abstraction hides the internal implementation and shows only functionality. (True)
10. Encapsulation increases the coupling between different classes. (False)
1. The OOP concept that allows code reusability through class hierarchy. (Inheritance)
2. The mechanism of binding data and methods into a single unit. (Encapsulation)
3. The ability of a class to provide different implementations of a method with the same name.
(Polymorphism)
4. The keyword used to inherit a class in Java. (extends)
5. A Java construct used to initialize objects. (Constructor)
6. The OOP concept that focuses only on essential features, hiding unnecessary details. (Abstraction)
7. A blueprint for creating objects in Java. (Class)
8. A reserved word that prevents method overriding in a subclass. (final)
9. Java feature that allows a class to inherit from a superclass. (Inheritance)
10. A function or method that behaves differently based on the object calling it. (Polymorphism)