1. What are the features of an Object Oriented Programming (OOPs)?
(A) Inheritance
(B) Encapsulation
(C) All the above
(D) Polymorphism
2. What are the features reused using Inheritance in Java?
(A) Methods
(B) All the above
(C) Constants
(D) Variables
3. Which inheritance in java programming is not supported?
(A) Multiple inheritance using classes
(B) Multiple inheritance using interfaces
(C) Multilevel inheritance
(D) Single inheritance
4. Advantage of inheritance in java programming is/are
(A) All
(B) Class Extendibility
(C) Save development time
(D) Code Re-usability
5. Inheritance relationship in Java language is
(A) Association
(B) None
(C) Has-A
(D) Is-A
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{}
7. Which is the keyword used to implement inheritance in Java?
(A) None
(B) implements
(C) instanceof
(D) extends
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) None
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 above
10. What concepts come under Polymorphism in java?
(A) All the above
(B) Constructor overloading
(C) Method overriding
(D) Method overloading
11. Which polymorphism concept is applied to inheritance relationship in java programming?
(A) Method overloading
(B) Constructor overloading
(C) Method overriding
(D) None
12. Which of these packages contains abstract keyword?
(A) java.system
(B) java.util
(C) java.io
(D) java.lang
13. Which is runtime polymorphism in java oops?
(A) Method overloading
(B) None
(C) Constructor overloading
(D) Method overriding
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{}
15. Which of the following variable violates the definition of encapsulation?
(A) Array variables
(B) Local variables
(C) Global variables
(D) Public variables
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;
17. The object cannot be________?
(A) passed by copy
(B) passed by value
(C) passed as function
(D) passed by reference
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 features
19. The combination of abstraction of the data and code is viewed in________.
(A) Object
(B) Inheritance
(C) Class
(D) Interfaces
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 codes