OOPS Java 50 Objective Questions Mid-1-2024-25
OOPS Java 50 Objective Questions Mid-1-2024-25
1. How many keywords are there in Java and the key must start with______
A) 58 and capital letter
B) 68 and small letter
C)57 and capital letter
D) 48 and small letter
ANSWER: B
8. Which component is used to compile, debug and execute the java programs?
A)JRE
B)JIT
C)JDK
D)JVM
ANSWER: C
12. What is the process of defining a method in terms of itself that is a method
that calls itself?
A)Polymorphism
B)Abstraction
C)Encapsulation
D)Recursion
ANSWER: D
13. Which of these operators is used to allocate memory to array variable in Java?
A)malloc
B)alloc
C)new
D)new malloc
ANSWER: C
Unit-1
1. -----------operators is used to allocate memory for an object?
Ans new
2. ----------- is the return type of a method that does not returns any value?
Ans void
1.Which of these can be used to fully abstract a class from its implementation?
A)Objects
B)Packages
C)Interfaces
D)None of the Mentioned
ANSWER: C
4.Which of this access specifies can be used for a class so that its members can be
accessed by a different class in the same package?
A)public
B)protected
C)No modifier
D)All of the Mentioned
ANSWER: D
6.Which of the following package stores all the standard java classes?
A)lang
B)util
C)awt
D)io
ANSWER: A
8.Which of these class is not related to input and output stream in terms of
functioning?
A)File
B)InputStream
C)Reader
D)OutputStream
ANSWER: A
10.Which of these is a method to clear all the data present in output buffers?
A)clear()
B)fflush()
C)flush()
D)close()
ANSWER: C
Unit-III
2. In order to determine the type that a polymorphic variable refers to, the
decision is made by the ____________________.
Ans Java run-time environment at run time.
4. _______ is the process by which object of one class acquires the properties
of object of another class.
Ans Inheritance
7. The class from which the subclass derives the properties is called as
_______________.
Ans superclass
8. The property or the ability to take more than one form is called as
____________.
Ans polymorphism