Is it necessary to use constructor in a class?

Constructor can be overloaded. Default constructor is automatically created when compiler does not find any constructor in a class . Parameterized constructor can call default constructor using this() method. A constructor can be static for static data field initialization.

Sizin İçin Seçtik  What is a constructor explain?

Leave a Reply

Your email address will not be published. Required fields are marked *