ExamLookup
Menu mobile
Home
Current Affairs
General Knowledge
Computer
Python
HTML
MCQ JAVA - JAVA CLASS AND OBJECTS MCQ Questions
English
Hindi
Question No. -
11
Report Bug
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. -
12
Report Bug
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
Question No. -
13
Report Bug
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. -
14
Report Bug
An object is called a class factory.
An object is called a class factory.
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
15
Report Bug
A class is an instance of an object.
A class is an instance of an object.
A class is an instance of an object.
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
16
Report Bug
The dot operator is used to access members in an object using an object
The dot operator is used to access members in an object using an object
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
17
Report Bug
In programming every object will have a name
In programming every object will have a name
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
18
Report Bug
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();
Explanation
Library book=new Library(); is correct format to create an object book of Library Class.
1
2
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Exam Quiz
Website development Company in Allahabad