Can child class have constructor?

A constructor cannot be called as a method . It is called when object of the class is created so it does not make sense of creating child class object using parent class constructor notation. i.e. Child c = new Parent();

Sizin İçin Seçtik  Java yükleyemiyorum ne yapmalıyım?

Leave a Reply

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