Can we have both this () and super () in the same constructor?

both this() and super() can not be used together in constructor . this() is used to call default constructor of same class.it should be first statement inside constructor.

Sizin İçin Seçtik  Can Super be used in a constructor?

Leave a Reply

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