Why constructor is called special method in Java?

It is treated as a special member function because its name is the same as the class name . Java constructors are invoked when their objects are created. It is named such because, it constructs the value, i.e., provide data for the object, i.e., they are used to initialize objects.

Sizin İçin Seçtik  Fed faiz beklentisi ne?

Leave a Reply

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