Should I always use a constructor?

If you don’t implement a constructor, the compiler will implictly create a default constructor if the class needs a constructor. So it depends on what you’re really asking. If you’re asking if you can write a class without explicitly creating a user defined constructor, yes you can do that.

Sizin İçin Seçtik  Garanti Bankası MKK nedir?

Leave a Reply

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