What would be behaviour if the constructor has a return type
What would be behaviour if the constructor has a return type?
a) Compilation error
b) Runtime error
c) Compilation and runs successfully
d)
What would be the behaviour if one parameterized constructor
What would be the behaviour if one parameterized constructor
What would be the behaviour if one parameterized constructor is explicitly defined, but no default constructor is provided?
a) Compilation
What is not the use of “this” keyword in Java
What is not the use of this keyword in Java
What is not the use of this keyword in Java?
a) Passing itself to another method
b) Calling another constructor in constructor chaining
c) Referring to the
What is true about protected constructor
What is true about protected constructor
What is true about protected constructor?
a) Protected constructor can be called directly
b) Protected constructor can only be called using super()
c) Protecte
Abstract class cannot have a constructor
Abstract class cannot have a constructor
Abstract class cannot have a constructor.
a) True
b) False
Answer: b
Explanation: No instance can be created of abstract class. Only pointer can hold instance
What is true about constructor
What is true about constructor
What is true about constructor?
a) It can contain return type
b) It can take any number of parameters
c) It can have any non access modifiers
d) Constructor cannot throw
What could be true about Class.getInstance() considering that it defines the getInstance() method
What could be true about Class.getInstance() considering that it defines the getInstance() method
What could be true about Class.getInstance() considering that it defines the getInstance() method?
a)
What is false about constructor
What is false about constructor
What is false about constructor?
a) Constructors cannot be synchronized in Java
b) Java does not provide default copy constructor
c) Constructor can have a return type
What would be the behaviour if this() and super() used in a method
What would be the behaviour if this() and super() used in a method
What would be the behaviour if this() and super() used in a method?
a) Runtime error
b) Throws exception
c) compile time error
d) Run
This set of Java Multiple Choice Questions & Answers (MCQs) focuses on “Constructor”.
This set of Java Multiple Choice Questions & Answers (MCQs) focuses on Constructor.
This set of Java Multiple Choice Questions & Answers (MCQs) focuses on Constructor.
1. What is true about pr
What are the landmarks of China
What are the landmarks of China
There are many landmarks in China, each province and city has its own unique symbol, here are some well-known landmarks
Beijing. Tian 'anmen Square is a landmark build
Website of China Construction Practicing Qualification Registration Center :https://www.pqrc.org.cn
Website of China Construction Practicing Qualification Registration Center
Website of China Construction Practicing Qualification Registration Center :https://www.pqrc.org.cn
The Practice Qualificatio
Website of the Ministry of Housing and Urban Rural Development of China:https://www.mohurd.gov.cn
Website of the Ministry of Housing and Urban Rural Development of China
Website of the Ministry of Housing and Urban Rural Development of China:https://www.mohurd.gov.cn
Contact information of the Mini
Website of China Construction Engineering Cost Management Association http://www.ccea.pro/
Engineering Cost Management Association
Engineering Cost Management Association http://www.ccea.pro/
The China Cost Engineering Association (CCEA) is a non-profit social organization voluntarily form
Chinese Architecture Society website:http://www.chinaasc.org.cn
Chinese Architecture Society website:
Chinese Architecture Society website: http://www.chinaasc.org.cn
The Architectural Society of China is an academic group composed of national architectural scien