Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : java - JAVA OBJECT ORIENTED PROGRAMMING
JAVA OBJECT ORIENTED PROGRAMMING
00:00:00
English
Hindi
Question No# :
01
out of 50
The concept of multiple inheritance is implemented in Java by
The concept of multiple inheritance is implemented in Java by
A.
extending two or more classes
extending two or more classes
B.
extending one class and implementing one or more interfaces
extending one class and implementing one or more interfaces
C.
implementing two or more interfaces
implementing two or more interfaces
D.
both B and C
both B and C
Question No# :
02
out of 50
When a class serves as base class for many derived classes, the situation is called:
When a class serves as base class for many derived classes, the situation is called:
A.
Polymorphism
Polymorphism
B.
Hierarchical inheritance
Hierarchical inheritance
C.
Hybrid inheritance
Hybrid inheritance
D.
Multipath inheritance
Multipath inheritance
Question No# :
03
out of 50
What is the term that is used to represent hierarchical relationship of generalization?
वह कौन सा शब्द है जिसका उपयोग सामान्यीकरण के पदानुक्रमित संबंध को दर्शाने के लिए किया जाता है?
A.
Polymorphism
Polymorphism
B.
Encapsulation
Encapsulation
C.
Abstraction
Abstraction
D.
Inheritance
Inheritance
Question No# :
04
out of 50
Which one of the following will declare an array and initialize it with five numbers?
Which one of the following will declare an array and initialize it with five numbers?
A.
Array a = new Array(5);
Array a = new Array(5);
B.
int [] a = {23,22,21,20,19};
int [] a = {23,22,21,20,19};
C.
int a = new int[5];
int a = new int[5];
D.
int [5] array;
int [5] array;
Question No# :
05
out of 50
Which of these method of class String is used to extract a single character from a String object?
Which of these method of class String is used to extract a single character from a String object?
A.
CHARAT()
CHARAT()
B.
chatat()
chatat()
C.
CharAt()
CharAt()
D.
ChatAt()
ChatAt()
Question No# :
06
out of 50
Polymorphism types in Java is/are
जावा में पॉलीमॉरफिस्म प्रकार है/हैं
A.
Compile time
Compile time
B.
Run time
Run time
C.
Both
Both
D.
None
None
Question No# :
07
out of 50
Which of the following clause will be done even if no exceptions are found?
Which of the following clause will be done even if no exceptions are found?
A.
Finally
Finally
B.
Throw
Throw
C.
Nested catch
Nested catch
D.
Catch
Catch
Question No# :
08
out of 50
Which concept of Java is achieved by combining methods and attribute into a class?
Which concept of Java is achieved by combining methods and attribute into a class?
A.
Inheritance
Inheritance
B.
Encapsulation
Encapsulation
C.
Polymorphism
Polymorphism
D.
Abstraction
Abstraction
Question No# :
09
out of 50
A.
Encapsulation
Encapsulation
B.
Class
Class
C.
Inheritance
Inheritance
D.
Polymorphism
Polymorphism
Question No# :
10
out of 50
Super is the predefined
Super is the predefined
A.
Keyword
Keyword
B.
Method
Method
C.
Keyword and Method
Keyword and Method
D.
None of above
None of above
Question No# :
11
out of 50
If m and n are int type variables, what will be the result of the expression m%n\nwhen m=5 and n=2 ?
If m and n are int type variables, what will be the result of the expression m%n\nwhen m=5 and n=2 ?
A.
0
0
B.
1
1
C.
2
2
D.
None of the above
None of the above
Question No# :
12
out of 50
Java Source Code is compiled into
Java Source Code is compiled into
A.
.obj
.obj
B.
.exe
.exe
C.
Byte code
Byte code
D.
None
None
Question No# :
13
out of 50
Name the characteristics of Object Oriented Programming that hides the complexity and provides a simple interface
ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग की उन विशेषताओं का नाम बताइए जो जटिलता को छिपाती है और एक सरल इंटरफ़ेस प्रदान करती है
A.
Encapsulation
Encapsulation
B.
Polymorphism
Polymorphism
C.
Abstraction
Abstraction
D.
Inheritance
Inheritance
Question No# :
14
out of 50
Which statement is true?\nSelect the one correct answer.
Which statement is true?\nSelect the one correct answer.
A.
new and delete are keywords in the Java language
new and delete are keywords in the Java language
B.
try, catch, and thrown are keywords in the Java language
try, catch, and thrown are keywords in the Java language
C.
static, unsigned, and long are keywords in the Java language
static, unsigned, and long are keywords in the Java language
D.
return, goto, and default are keywords in the Java language
return, goto, and default are keywords in the Java language
Question No# :
15
out of 50
When does method overloading is determined?
मेथड ओवरलोडिंग कब निर्धारित की जाती है?
A.
At run time
At run time
B.
At compile time
At compile time
C.
At coding time
At coding time
D.
At execution time
At execution time
Question No# :
16
out of 50
Which statements are true?\nSelect the one correct answers.
Which statements are true?\nSelect the one correct answers.
A.
A class must define a constructor
A class must define a constructor
B.
A constructor can be declared private
A constructor can be declared private
C.
A constructor can return a value
A constructor can return a value
D.
A constructor must initialize all fields when a class is instantiated
A constructor must initialize all fields when a class is instantiated
Question No# :
17
out of 50
Which among the following operator is used to access individual members of an object?
किसी ऑब्जेक्ट के व्यक्तिगत सदस्यों तक पहुँचने के लिए निम्नलिखित में से किस ऑपरेटर का उपयोग किया जाता है?
A.
. (dot)
. (dot)
B.
+ (plus)
+ (plus)
C.
– (minus)
– (minus)
D.
/ (divide)
/ (divide)
Question No# :
18
out of 50
Which of the tool is used to compile java code?
Which of the tool is used to compile java code?
A.
Javac
Javac
B.
Java
Java
C.
exe
exe
D.
Run
Run
Question No# :
19
out of 50
What is byte code in the context of Java?
What is byte code in the context of Java?
A.
The type of code generated by a Java compiler
The type of code generated by a Java compiler
B.
The type of code generated by a Java Virtual Machine
The type of code generated by a Java Virtual Machine
C.
It is another name for a Java source file
It is another name for a Java source file
D.
It is the code written within the instance methods of a class
It is the code written within the instance methods of a class
Question No# :
20
out of 50
What is false about constructor?
What is false about constructor?
A.
Constructors cannot be synchronized in Java
Constructors cannot be synchronized in Java
B.
Java does not provide default copy constructor
Java does not provide default copy constructor
Question No# :
21
out of 50
Which of the following is not OOPS concept in Java?
निम्नलिखित में से कौन जावा में OOPS अवधारणा नहीं है?
A.
Inheritance
Inheritance
B.
Encapsulation
Encapsulation
C.
Polymorphism
Polymorphism
D.
Compilation
Compilation
Question No# :
22
out of 50
Which among the following is called first, automatically, whenever an object is created?
Which among the following is called first, automatically, whenever an object is created?
A.
Class
Class
B.
Constructor
Constructor
C.
New
New
D.
Trigger
Trigger
Question No# :
23
out of 50
To stop the execution of a thread, which of the following method is used?
To stop the execution of a thread, which of the following method is used?
A.
notify
notify
B.
wait()
wait()
C.
notifyall()
notifyall()
D.
stop()
stop()
Question No# :
24
out of 50
Which of the following may be part of a class definition?
Which of the following may be part of a class definition?
A.
instance variables
instance variables
B.
instance methods
instance methods
C.
constructors
constructors
D.
all of the above
all of the above
Question No# :
25
out of 50
A ____ is a template that binds together data and methods together
____ एक टेम्पलेट है जो डेटा और विधियों को एक साथ जोड़ता है
A.
Class
Class
B.
Object
Object
C.
Method
Method
D.
None of these
None of these
Question No# :
26
out of 50
Which of the following is a type of polymorphism in Java?
निम्नलिखित में से कौन सा जावा में पॉलीमॉरफिस्म का एक प्रकार है?
A.
Compile time polymorphism
Compile time polymorphism
B.
Execution time polymorphism
Execution time polymorphism
C.
Multiple polymorphism
Multiple polymorphism
D.
Multilevel polymorphism
Multilevel polymorphism
Question No# :
27
out of 50
Which of these is a super class of wrappers Double & Integer?
Which of these is a super class of wrappers Double & Integer?
A.
Long
Long
B.
Digits
Digits
C.
Float
Float
D.
Number
Number
Question No# :
28
out of 50
Hiding the complexity in program is known as
प्रोग्राम में जटिलता को छुपाना कहलाता है
A.
Abstraction
Abstraction
B.
Encapsulation
Encapsulation
C.
Data hiding
Data hiding
D.
Composition
Composition
Question No# :
29
out of 50
The class string belongs to ................... package.
The class string belongs to ................... package.
A.
java.awt
java.awt
B.
java.lang
java.lang
C.
java.applet
java.applet
D.
java.string
java.string
Question No# :
30
out of 50
Which one of the following class declarations is a valid declaration of a class that\ncannot be instantiated?\nSelect the one correct answer.
Which one of the following class declarations is a valid declaration of a class that\ncannot be instantiated?\nSelect the one correct answer.
A.
class Ghost { abstract void haunt(); }
class Ghost { abstract void haunt(); }
B.
abstract class Ghost { void haunt(); }
abstract class Ghost { void haunt(); }
C.
abstract class Ghost { void haunt() {}; }
abstract class Ghost { void haunt() {}; }
D.
abstract Ghost { abstract void haunt(); }
abstract Ghost { abstract void haunt(); }
Question No# :
31
out of 50
Name the characteristics of Object Oriented Programming that hides the complexity and provides a simple interface.
ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग की उन विशेषताओं का नाम बताइए जो जटिलता को छिपाती है और एक सरल इंटरफ़ेस प्रदान करती है।
A.
Encapsulation
Encapsulation
B.
Polymorphism
Polymorphism
C.
Abstraction
Abstraction
D.
Inheritance
Inheritance
Question No# :
32
out of 50
A package is a collection of
A package is a collection of
A.
classes
classes
B.
interfaces
interfaces
C.
editing tools
editing tools
D.
classes and interfaces
classes and interfaces
Question No# :
33
out of 50
A default constructor
A default constructor
A.
has no arguments
has no arguments
B.
has no return type
has no return type
C.
has one argument but no return type
has one argument but no return type
D.
has two arguments
has two arguments
Question No# :
34
out of 50
The class at the top of exception class hierarchy is ..........................
The class at the top of exception class hierarchy is ..........................
A.
ArithmeticException
ArithmeticException
B.
Throwable
Throwable
C.
Class
Class
D.
Exception
Exception
Question No# :
35
out of 50
What is meant by state of an object?
किसी वस्तु की अवस्था से क्या तात्पर्य है?
A.
Functions of the object
Functions of the object
B.
Data Members of the object
Data Members of the object
C.
Content of an object
Content of an object
D.
All of these
All of these
Question No# :
36
out of 50
What will happen if static modifier is removed from the signature of the main method?
What will happen if static modifier is removed from the signature of the main method?
A.
Compilation Error
Compilation Error
B.
RunTime Error: NoSuchMethodError
RunTime Error: NoSuchMethodError
C.
Program will compile and run without any output
Program will compile and run without any output
D.
Program will compile and run to show the required output
Program will compile and run to show the required output
Question No# :
37
out of 50
What is the process of defining more than one method in a class differentiated by method signature?
What is the process of defining more than one method in a class differentiated by method signature?
A.
Function overriding
Function overriding
B.
Function overloading
Function overloading
C.
Function doubling
Function doubling
D.
None of the mentioned
None of the mentioned
Question No# :
38
out of 50
Exposing only necessary information to clients ( main programs, classes) is known as
ग्राहकों (मुख्य कार्यक्रमों, कक्षाओं) के लिए केवल आवश्यक जानकारी को उजागर करना के रूप में जाना जाता है
A.
Abstraction
Abstraction
B.
Encapsulation
Encapsulation
C.
Data hiding
Data hiding
D.
Hiding complexity
Hiding complexity
Question No# :
39
out of 50
Which statement about objects is true?
ऑब्जेक्ट के बारे में कौन सा कथन सत्य है?
A.
One object is used to create one class.
One object is used to create one class.
B.
One class is used to create one object.
One class is used to create one object.
C.
One object can create many classes.
One object can create many classes.
D.
One class can create many objects.
One class can create many objects.
Question No# :
40
out of 50
An object is represented by two attributes, out of which one is characteristics and the other one is
किसी वस्तु को दो विशेषताओं द्वारा दर्शाया जाता है, जिनमें से एक विशेषता है और दूसरी विशेषता है
A.
Behaviour
Behaviour
B.
Situation
Situation
C.
Abstraction
Abstraction
D.
Encapsulation
Encapsulation
Question No# :
41
out of 50
For Cat and Animal class, correct way of inheritance in java is
बिल्ली और पशु वर्ग के लिए, जावा में वंशानुक्रम का सही तरीका है
A.
class Cat extends Animal
class Cat extends Animal
B.
class Animal extends Cat
class Animal extends Cat
C.
Both are correct way
Both are correct way
D.
None is correct way
None is correct way
Question No# :
42
out of 50
Name the programming technique that specifies a series of well-structured steps and procedures within its programming context to compose a program.
उस प्रोग्रामिंग तकनीक का नाम बताइए जो एक प्रोग्राम बनाने के लिए उसके प्रोग्रामिंग संदर्भ के भीतर अच्छी तरह से संरचित चरणों और प्रक्रियाओं की एक श्रृंखला निर्दिष्ट करती है।
A.
Procedure Oriented Programming
Procedure Oriented Programming
B.
Modular Programming
Modular Programming
C.
Object Oriented Programming
Object Oriented Programming
D.
None of these
None of these
Question No# :
43
out of 50
Which of these class is used to create an object whose character sequence is mutable?
Which of these class is used to create an object whose character sequence is mutable?
A.
String()
String()
B.
StringBuffer()
StringBuffer()
C.
String() & StringBuffer()
String() & StringBuffer()
D.
None of the mentioned
None of the mentioned
Question No# :
44
out of 50
What is the behaviour aspect of an object represented by?
किसी वस्तु का व्यवहार पहलू किसके द्वारा दर्शाया जाता है?
A.
Member Functions
Member Functions
B.
Data Members
Data Members
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No# :
45
out of 50
Which of the following methods belong to the string class?
Which of the following methods belong to the string class?
A.
length( )
length( )
B.
compare To ( )
compare To ( )
C.
equals ( )
equals ( )
D.
All of them
All of them
Question No# :
46
out of 50
Name the art of implementing Encapsulation in Object Oriented Programming.
ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग में एनकैप्सुलेशन लागू करने की कला का नाम बताइए।
A.
Polymorphism
Polymorphism
B.
Encapsulation
Encapsulation
C.
Abstraction
Abstraction
D.
class
class
Question No# :
47
out of 50
Which of the following statements about arrays is syntactically wrong
Which of the following statements about arrays is syntactically wrong
A.
arrayName[] p = new arrayName[5];
arrayName[] p = new arrayName[5];
B.
arrayName p[5];
arrayName p[5];
C.
arrayName[] p [];
arrayName[] p [];
D.
arrayName p[][] = new arrayName[2][];
arrayName p[][] = new arrayName[2][];
Question No# :
48
out of 50
Which of the following class is not included in java.lang?
Which of the following class is not included in java.lang?
A.
Byte
Byte
B.
Integer
Integer
C.
Array
Array
D.
Class
Class
Question No# :
49
out of 50
In a class, encapsulating an object of another class is called
In a class, encapsulating an object of another class is called
A.
Composition
Composition
B.
Inheritance
Inheritance
C.
Encapsulation
Encapsulation
D.
None
None
Question No# :
50
out of 50
Which of these class is super class of every class in Java?
Which of these class is super class of every class in Java?
A.
String class
String class
B.
Object class
Object class
C.
Abstract class
Abstract class
D.
ArrayList class
ArrayList class
Latest Current Affairs 2025
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2025
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Sarkari Exam Quiz