Advertisements
Advertisements
प्रश्न
What is meant by a constructor?
लघु उत्तर
उत्तर
A constructor is a member method with the same name as the class. It initializes data members or instance variables and creates class objects.
Example: Car ob = new Car();
The statement invokes the Car class's default constructor.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?