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 CLASS AND OBJECTS
JAVA CLASS AND OBJECTS
00:00:00
English
Hindi
Question No# :
01
out of 14
Which among the following keyword is used to allocate memory space for an object?
Which among the following keyword is used to allocate memory space for an object?
A.
new
new
B.
for
for
C.
while
while
D.
int
int
Question No# :
02
out of 14
Information passed to a method through arguments is called
Information passed to a method through arguments is called
A.
Message
Message
B.
Variables
Variables
C.
Numbers
Numbers
D.
Data
Data
Question No# :
03
out of 14
Which among the following is the correct construct for creating an object named ‘book’ of the ‘Library’ class?
Which among the following is the correct construct for creating an object named ‘book’ of the ‘Library’ class?
A.
Library book=new Library;
Library book=new Library;
B.
book =new Library();
book =new Library();
C.
Library() book=new Library();
Library() book=new Library();
D.
Library book=new Library();
Library book=new Library();
Question No# :
04
out of 14
Which among the following is used to change the state of an object?
Which among the following is used to change the state of an object?
A.
Data Members
Data Members
B.
Name of the class
Name of the class
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No# :
05
out of 14
How many objects can you create from a class?
How many objects can you create from a class?
A.
One
One
B.
Two
Two
C.
Three
Three
D.
Any number
Any number
Question No# :
06
out of 14
If a method named show( ) is to be invoked using an object ‘ob’ , which among the following is correct?
If a method named show( ) is to be invoked using an object ‘ob’ , which among the following is correct?
A.
ob.show( )
ob.show( )
B.
ob.show
ob.show
C.
show( ).ob
show( ).ob
D.
None of these
None of these
Question No# :
07
out of 14
What among the following is not a component of a message?
What among the following is not a component of a message?
A.
An object identifier
An object identifier
B.
A method name
A method name
C.
Arguments
Arguments
D.
Data Members
Data Members
Question No# :
08
out of 14
Which among the following creates a blueprint to represent characteristic and behaviour of an object?
Which among the following creates a blueprint to represent characteristic and behaviour of an object?
A.
Object
Object
B.
Class
Class
C.
Instance
Instance
D.
None of these
None of these
Question No# :
09
out of 14
How is encapsulation implemented in a program?
How is encapsulation implemented in a program?
A.
Using a class
Using a class
B.
Using only Functions
Using only Functions
C.
Using only Variables
Using only Variables
D.
None of these
None of these
Question No# :
10
out of 14
How are the characteristics of an object represented in a class?
How are the characteristics of an object represented in a class?
A.
Data Members
Data Members
B.
Member Functions
Member Functions
C.
Access specifiers
Access specifiers
D.
None of these
None of these
Question No# :
11
out of 14
Name the operator that is used to allocate memory space for an object.
Name the operator that is used to allocate memory space for an object.
A.
Dot
Dot
B.
New
New
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No# :
12
out of 14
Which among the following do not belong to an object?
Which among the following do not belong to an object?
A.
State
State
B.
Behaviour
Behaviour
C.
Identity
Identity
D.
Class
Class
Question No# :
13
out of 14
Which among the following is not a component of a class?
Which among the following is not a component of a class?
A.
Modifiers
Modifiers
B.
Class name
Class name
C.
Object
Object
D.
Body
Body
Question No# :
14
out of 14
Which among the following is used to represent behaviour in a class?
Which among the following is used to represent behaviour in a class?
A.
Method
Method
B.
Data members
Data members
C.
Both a and b
Both a and b
D.
None of these
None of these
Latest Current Affairs 2024
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2024
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