, OOPS and Java
MCQ practice question paper
Question 1:
________ is the property with the help of which data and associated function is binded in a single unit.
Options:
a. Abstraction
b. Polymorphism
c. Encapsulation
d. Inheritance
Answer: c. Encapsulation
Explanation:
Encapsulation is the OOP principle where data (variables) and associated functions (methods) are
bundled together into a single unit called a class.
Question 2:
The class with the help of which input is taken from the user is _____.
Options:
a. Scanner class
b. InputStreamReader class
c. BufferedReader class
d. All of these
,Answer: d. All of these
Explanation:
Input can be taken from the user in Java using Scanner, InputStreamReader, or BufferedReader. All of
them are valid.
Question 3:
____ is the process of defining the same method in the child class as defined in the parent class.
Options:
a. Method Overloading
b. Method Overriding
c. Method Overwriting
d. None of these
Answer: b. Method Overriding
Explanation:
Method overriding occurs when a subclass defines a method with the same name, parameters, and
return type as a method in its superclass, providing its own implementation.
Question 4:
_______ is the process of hiding the implementational details and showing only the functional details.
Options:
, a. Abstraction
b. Polymorphism
c. Encapsulation
d. Inheritance
Answer: a. Abstraction
Explanation:
Abstraction focuses on hiding internal implementation details and exposing only the essential functionality
to the user.
Question 5:
_________ is a collection of objects with similar characteristics and behaviour.
Options:
a. class
b. object
c. method
d. all of these
Answer: a. class
Explanation:
A class is a blueprint or collection of objects that share similar attributes (characteristics) and methods
(behaviors).
MCQ practice question paper
Question 1:
________ is the property with the help of which data and associated function is binded in a single unit.
Options:
a. Abstraction
b. Polymorphism
c. Encapsulation
d. Inheritance
Answer: c. Encapsulation
Explanation:
Encapsulation is the OOP principle where data (variables) and associated functions (methods) are
bundled together into a single unit called a class.
Question 2:
The class with the help of which input is taken from the user is _____.
Options:
a. Scanner class
b. InputStreamReader class
c. BufferedReader class
d. All of these
,Answer: d. All of these
Explanation:
Input can be taken from the user in Java using Scanner, InputStreamReader, or BufferedReader. All of
them are valid.
Question 3:
____ is the process of defining the same method in the child class as defined in the parent class.
Options:
a. Method Overloading
b. Method Overriding
c. Method Overwriting
d. None of these
Answer: b. Method Overriding
Explanation:
Method overriding occurs when a subclass defines a method with the same name, parameters, and
return type as a method in its superclass, providing its own implementation.
Question 4:
_______ is the process of hiding the implementational details and showing only the functional details.
Options:
, a. Abstraction
b. Polymorphism
c. Encapsulation
d. Inheritance
Answer: a. Abstraction
Explanation:
Abstraction focuses on hiding internal implementation details and exposing only the essential functionality
to the user.
Question 5:
_________ is a collection of objects with similar characteristics and behaviour.
Options:
a. class
b. object
c. method
d. all of these
Answer: a. class
Explanation:
A class is a blueprint or collection of objects that share similar attributes (characteristics) and methods
(behaviors).