ExamLookup
Menu mobile
Home
Current Affairs
General Knowledge
Computer
Python
HTML
MCQ JAVA - JAVA CONSTRUCTORS MCQ Questions
English
Hindi
Question No. -
01
Report Bug
Which of the following is not applicable for a constructor function?
Which of the following is not applicable for a constructor function?
A.
It has the same name as the class.
It has the same name as the class.
B.
It has no return-type
It has no return-type
C.
It is usually used for initialisation
It is usually used for initialisation
D.
It can be invoked using an object like any other member function
It can be invoked using an object like any other member function
Question No. -
02
Report Bug
If the name of a class is ‘Number’, what can be the possible name for its constructor?
If the name of a class is ‘Number’, what can be the possible name for its constructor?
A.
Number
Number
B.
number
number
C.
construct
construct
D.
Number_contruct
Number_contruct
Question No. -
03
Report Bug
Which among the following is a type of constructor?
Which among the following is a type of constructor?
A.
Parameterised constructor
Parameterised constructor
B.
Non-parameterised constructor
Non-parameterised constructor
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No. -
04
Report Bug
If constructors are overloaded, what differentiates it?
If constructors are overloaded, what differentiates it?
A.
Parameter list
Parameter list
B.
Return type
Return type
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No. -
05
Report Bug
What access specifier for a constructor allows you to create an object only within the class?
What access specifier for a constructor allows you to create an object only within the class?
A.
public
public
B.
private
private
C.
protected
protected
D.
default
default
Question No. -
06
Report Bug
Name the type of constructor that gets invoked when an object is created, which is initialised with the content of another object.
Name the type of constructor that gets invoked when an object is created, which is initialised with the content of another object.
A.
Copy constructor
Copy constructor
B.
Default constructor
Default constructor
C.
Overloaded constructor
Overloaded constructor
D.
None of these
None of these
Question No. -
07
Report Bug
return type of Constructors function is
कंस्ट्रक्टर्स फ़ंक्शन का रिटर्न प्रकार है
कंस्ट्रक्टर्स फ़ंक्शन का रिटर्न प्रकार है
A.
Void
Void
B.
Int
Int
C.
Array
Array
D.
Constructor function no return any value
Constructor function no return any value
Question No. -
08
Report Bug
What is true about a Constructor
एक कंस्ट्रक्टर के बारे में क्या सच है?
एक कंस्ट्रक्टर के बारे में क्या सच है?
A.
Its name is plural of class name
Its name is plural of class name
B.
Its name has * symbol before it
Its name has * symbol before it
C.
Its name is same as of class name
Its name is same as of class name
D.
Its name has # symbol before it
Its name has # symbol before it
1
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