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
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# :
02
out of 50
Name the programming technique that implements programs as an organised collection of interactive objects.
उस प्रोग्रामिंग तकनीक का नाम बताइए जो प्रोग्राम को इंटरैक्टिव ऑब्जेक्ट के एक संगठित संग्रह के रूप में कार्यान्वित करती है।
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# :
03
out of 50
Which of these keywords cannot be used for a class which has been declared final?
Which of these keywords cannot be used for a class which has been declared final?
A.
abstract
abstract
B.
extends
extends
C.
abstract and extends
abstract and extends
D.
None of the mentioned
None of the mentioned
Question No# :
04
out of 50
Which of the following control expressions are valid for an if statement?
Which of the following control expressions are valid for an if statement?
A.
An integer expression
An integer expression
B.
A Boolean expression
A Boolean expression
C.
Either A or B
Either A or B
D.
Neither A nor B
Neither A nor B
Question No# :
05
out of 50
If you want to write multiple functions in a class with same name, then what Java feature will you use?
यदि आप एक क्लास में एक ही नाम से कई फ़ंक्शन लिखना चाहते हैं, तो आप किस जावा फीचर का उपयोग करेंगे?
A.
Function overriding
Function overriding
B.
Encapsulation
Encapsulation
C.
Function overloading
Function overloading
D.
None
None
Question No# :
06
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# :
07
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# :
08
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# :
09
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# :
10
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# :
11
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# :
12
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# :
13
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
Question No# :
14
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# :
15
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# :
16
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# :
17
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# :
18
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# :
19
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# :
20
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# :
21
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# :
22
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# :
23
out of 50
Which class cannot be a subclass in java
Which class cannot be a subclass in java
A.
abstract class
abstract class
B.
parent class
parent class
C.
Final class
Final class
D.
None of above
None of above
Question No# :
24
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# :
25
out of 50
What would happen if \"String[]args\" is not included as argument in the main method.
What would happen if \"String[]args\" is not included as argument in the main method.
A.
No error
No error
B.
Compilation error
Compilation error
C.
Program won\'t run
Program won\'t run
D.
Program exit
Program exit
Question No# :
26
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# :
27
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# :
28
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# :
29
out of 50
Which class cannot be a subclass in java
Which class cannot be a subclass in java
A.
Abstract class
Abstract class
B.
Parent class
Parent class
C.
Final class
Final class
D.
None of above
None of above
Question No# :
30
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# :
31
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# :
32
out of 50
Name the programming technique that implements programs as an organized collection of interactive objects.
उस प्रोग्रामिंग तकनीक का नाम बताइए जो प्रोग्राम को इंटरैक्टिव ऑब्जेक्ट के एक संगठित संग्रह के रूप में कार्यान्वित करती है।
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# :
33
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# :
34
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# :
35
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# :
36
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# :
37
out of 50
System.in.read() is being used, the program must specify the .................. clause.
System.in.read() is being used, the program must specify the .................. clause.
A.
throws.java.out.IOException
throws.java.out.IOException
B.
throws.java.in.IOException
throws.java.in.IOException
C.
throws.java.io.IOException
throws.java.io.IOException
D.
throws.java.io.InException
throws.java.io.InException
Question No# :
38
out of 50
A.
new
new
B.
this
this
C.
invoke
invoke
D.
class
class
Question No# :
39
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# :
40
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# :
41
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# :
42
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# :
43
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# :
44
out of 50
Which one of the following class declarations is a valid declaration of a class that\ncannot be extended?\nSelect the one correct answer.
Which one of the following class declarations is a valid declaration of a class that\ncannot be extended?\nSelect the one correct answer.
A.
class Link { }
class Link { }
B.
abstract class Link { }
abstract class Link { }
C.
native class Link { }
native class Link { }
D.
final class Link { }
final class Link { }
Question No# :
45
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# :
46
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# :
47
out of 50
A.
Encapsulation
Encapsulation
B.
Class
Class
C.
Inheritance
Inheritance
D.
Polymorphism
Polymorphism
Question No# :
48
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# :
49
out of 50
Which among the following modifier is used in a ‘class’?
निम्नलिखित में से किस संशोधक का उपयोग 'क्लास' में किया जाता है?
A.
public
public
B.
default
default
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No# :
50
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
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