1.

_____is used to create an object.(a) class(b) constructor(c) User-defined functions(d) In-built functionsThis question was addressed to me during a job interview.Query is from Classes and Objects topic in section Classes and Objects, Inheritance, Polymorphism, Encapsulation and Exception Handling of Python

Answer»

Correct answer is (b) constructor

The best I can explain: The values assigned by the constructor to the class MEMBERS is used to CREATE the OBJECT.



Discussion

No Comment Found

Related InterviewSolutions