Is it mandatory to have default constructor?

The compiler doesn’t ever enforce the existence of a default constructor. You can have any kind of constructor as you wish. For some libraries or frameworks it might be necessary for a class to have a default constructor, but that is not enforced by the compiler .

Sizin İçin Seçtik  MX Coin kaç dolar?

Leave a Reply

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