Can constructor be overloaded and overridden in Java?

It is never possible . Constructor Overriding is never possible in Java. This is because, Constructor looks like a method but name should be as class name and no return value.

Sizin İçin Seçtik  How does a default constructor work in Java?

Leave a Reply

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

Can constructor be overloaded and overridden in Java?

It is never possible . Constructor Overriding is never possible in Java. This is because, Constructor looks like a method but name should be as class name and no return value.

Sizin İçin Seçtik  What is the benefit of constructor overloading in Java?

Leave a Reply

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