Chapter 5 Object Oriented Programming MCQs 20 min Score: 0 Attempted: 0/20 Subscribe 1. What are the features of an Object Oriented Programming (OOPs)? (A) Inheritance (B) Encapsulation (C) All the above (D) PolymorphismShow All Answers 2. What are the features reused using Inheritance in Java? (A) Methods (B) All the above (C) Constants (D) VariablesShow All Answers 3. Which inheritance in java programming is not supported? (A) Multiple inheritance using classes (B) Multiple inheritance using interfaces (C) Multilevel inheritance (D) Single inheritanceShow All Answers 4. Advantage of inheritance in java programming is/are (A) All (B) Class Extendibility (C) Save development time (D) Code Re-usabilityShow All Answers 5. Inheritance relationship in Java language is (A) Association (B) None (C) Has-A (D) Is-AShow All Answers 6. If class B is subclassed from class A then which is the correct syntax? (A) class B:A (B) class B extends class A{} (C) class B extends A{} (D) class B implements A{}Show All Answers 7. Which is the keyword used to implement inheritance in Java? (A) None (B) implements (C) instanceof (D) extendsShow All Answers 8. To control inheritance to different classes and levels, Java provides ______________. (A) Access modifiers like default, public, protected, private (B) Static keyword (C) Return types like void, int, float, double, and other object types (D) NoneShow All Answers 9. To stop or block inheriting a given class, the ___ keyword is used before the class. (A) static (B) final (C) private (D) none of the aboveShow All Answers 10. What concepts come under Polymorphism in java? (A) All the above (B) Constructor overloading (C) Method overriding (D) Method overloadingShow All Answers 11. Which polymorphism concept is applied to inheritance relationship in java programming? (A) Method overloading (B) Constructor overloading (C) Method overriding (D) NoneShow All Answers 12. Which of these packages contains abstract keyword? (A) java.system (B) java.util (C) java.io (D) java.langShow All Answers 13. Which is runtime polymorphism in java oops? (A) Method overloading (B) None (C) Constructor overloading (D) Method overridingShow All Answers 14. What is the syntax of abstract class in java? (A) abstract A{} (B) abstract class A (C) abstract class A[] (D) abstract class A{}Show All Answers 15. Which of the following variable violates the definition of encapsulation? (A) Array variables (B) Local variables (C) Global variables (D) Public variablesShow All Answers 16. Which of the following statement of a program is not right? (A) class teacher{ }; teacher s[5]; (B) class teacher{ }s; (C) class teacher{ }s[]; (D) class teacher{ }; teacher s;Show All Answers 17. The object cannot be________? (A) passed by copy (B) passed by value (C) passed as function (D) passed by referenceShow All Answers 18. Which definition best defines the concept of abstraction? (A) Hides the important data (B) Showing the important data (C) Hiding the implementation (D) Hides the implementation and showing only the featuresShow All Answers 19. The combination of abstraction of the data and code is viewed in________. (A) Object (B) Inheritance (C) Class (D) InterfacesShow All Answers 20. The principle of abstraction ___________ (A) is used to achieve OOPs. (B) Use abstraction at its minimum (C) is used to avoid duplication (D) is used to remove longer codesShow All Answers