Can we use this () and super () in a constructor?

We can use super() as well this() only once inside constructor . If we use super() twice or this() twice or super() followed by this() or this() followed by super(), then immediately we get compile time error i.e, we can use either super() or this() as first statement inside constructor and not both.

Sizin İçin Seçtik  Süperclass nedir?

Leave a Reply

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