Object Oriented Programming MCQ Question Answer - CodeTextPro

Object Oriented Programming in Java MCQ Question with Answer.

OOP
Object Oriented Programming



OOP: Procedural programming is about writing procedures or methods that perform operations on the data, while object-oriented programming is about creating objects that contain both data and methods.


(Multiple Choice Type Question)

(i) Which of the following is not an OOPS concept?

a. Encapsulation 
b. Polymorphism
c. Exception 
d. Abstraction
Answer: Exception

(ii) Which feature of OOPS described the reusability of code?

a. Abstraction 
b. Encapsulation
c. Polymorphism 
d. Inheritance
Answer: Inheritance

(iii) Which feature of OOPS derives the class from another class?

a. Inheritance 
b. Data hiding
c. Encapsulation 
d. Polymorphism
Answer: Inheritance

(iv) Which among the following feature is not in the general definition of OOPS?

a. Modularity 
b. Efficient Code
c. Code reusability 
d. Duplicate or Redundant Data
Answer: Duplicate or Redundant Data

(v) A single program of OOPS contains _______ classes?

a. Only 1 
b. Only 999
c. Only 100 
d. Any number
Answer: Any number

(vi) Which among the following cannot be used for the concept of polymorphism?

a. Static member function 
b. Constructor Overloading
c. Member function overloading 
d. Global member function
Answer: Static member function

(vii) Which function best describe the concept of polymorphism in programming languages?

a. Class member function 
b. Virtual function
c. Inline function 
d. Undefined function
Answer: Virtual function

(viii) Which of the following language uses the classes but not the polymorphism concept?

a. Procedure Oriented language 
b. Object-based language
c. Class-based language 
d. Dynamic programming language
Answer: Object-based language

(ix) What is the extra feature in classes which was not in the structures?

a. Member functions 
b. Data members
c. Public access specifier 
d. Static Data allowed
Answer: Member functions
(x) Which of the following feature is also known as run-time binding or late binding?

a. Dynamic typing 
b. Dynamic loading
c. Dynamic binding
d. Data hiding
Answer: Dynamic binding
(xi) The principle of abstraction___________

a. is used to achieve OOPS. 
b. is used to avoid duplication
c. Use abstraction at its minimum 
d. is used to remove longer codes
Answer: is used to avoid duplication
(xii) Which of the following is not a Java features?

a. Dynamic 
b. Architecture Neutral
c. Use of pointers 
d. Object-oriented
Answer: Use of pointers
(xiii) What does the expression float a = 35 / 0 return?

a. 0
b. Not a Number
c. Infinity 
d. Run time exception
Answer: Infinity
(xiv) The feature by which one object can interact with another object is _____________

a. Message reading 
b. Message Passing
c. Data transfer 
d. Data Binding
Answer: Message Passing
(xv) Which is not a feature of OOP in general definitions?

a. Efficient Code 
b. Code reusability
c. Modularity 
d. Duplicate/Redundant data
Answer: Duplicate/Redundant data
(xvi) Which among the following doesn’t come under OOP concept?

a. Data hiding 
b. Message passing
c. Platform independent 
d. Data binding
Answer: Platform independent
(xvii) Which is an abstract data type?

a. Double 
b. String
c. Enum 
d. Class
Answer: Class
(xviii) Extension of Java file is

a) .doc 
b) .pas
c) .txt 
d) .java
Answer: .java
(xix) After compilation the Java program is coveted to

a. Byte 
b. Java file
c. Byte code 
d. Byte basic
Answer: Byte code
(xx) JDK stands for

a. Java data kit 
b. Java down kit
c. Java development kit 
d. Java development key
Answer: Java development kit

Post a Comment

0 Comments