July 8, 2020 Baibhav Computer No Comments 37 Created on July 08, 2020 By Baibhav Computer MULTIPLE QUESTION ANSWERS ON CHAPTER :: CONSTRUCTOR 1 / 10 .A constructor is used when an _______________ is created object class member function 2 / 10 A_____________ constructor creates objects through values passed to it. Default Parameterized Private Public 3 / 10 What is true about constructor? It can contain return type It can take any number of parameters It can have any non access modifiers Constructor cannot throw an exception 4 / 10 What would be behaviour if the constructor has a return type? Runtime error Compilation and runs successfully Only String return type is allowed Compilation error 5 / 10 For constructor overloading, each constructor must differ in ___________ and __________ Number of arguments and type of arguments Number of arguments and return type Return type and type of arguments Return type and definition 6 / 10 Which of the following is not true for static block? It is used to initialize static variables. It can print the content of instance variables. It begins with the static keyword. It gets executed when a class gets loaded in the memory. 7 / 10 Which among the following is a type of constructor? Non-parameterised constructor Parameterised constructor Both a and b . None of these 8 / 10 If the name of a class is ‘Number’, what can be the possible name for its constructor? Number number No name 9 / 10 Which of the following is not applicable for a constructor function? It has no return-type It is usually used for initialization It has the same name as the class. It can be invoked using an object like any other member function. 10 / 10 Which among the following is called first, automatically, whenever an object is created? Class Constructor New Trigger Your score is LinkedIn Facebook Twitter Restart Exam Previous Post Newer Post