Classes and Objects 03 Flashcards
1
Q
What is the purpose of a ‘constructor’ method?
A
A constructor is a special member used to create and instance in a class. it is called whenever object of that class is created. They are used to initialise data field in object.