Create a free account on Computer Sir Ki Class and unlock access to valuable learning resources.
Exam Paper Downloads: After registering and logging in, you can download exam question papers in PDF format to practice and prepare for your exams.
Student Support: Get assistance with your doubts, queries, and questions related to your studies. Our support is here to help you understand topics and resolve your learning difficulties.
Register today and make your exam preparation easier and more effective!
Constructor Characteristics:
1) Constructor name is always same as the class name.
2) Constructor does not return any data value, not even the void data.
Notes:
Some other characteristics are as follows –
Constructors are called automatically, when the instance of class (object) is created.
Constructors can be called only once, while the methods can be called any number of times.
Constructors can have arguments (parameterized) or may not have arguments (non-parameterized).
Constructors can have access modifiers like private, public, protected etc.
Constructors can be overloaded like other methods.
Constructors cannot be abstract, final, native, static, or synchronized.
Constructor do not return a data value, but they can return class instance.
C. Sir| Created: 25-Mar-2018 | Updated: 12-Apr-2019|ICSE2018