What’s the use of a constructor?

The purpose of constructor is to initialize the object of a class while the purpose of a method is to perform a task by executing java code. Constructors cannot be abstract, final, static and synchronised while methods can be. Used to initialize the data members of a class.

Sizin İçin Seçtik  Kalpte ekstra atım neden olur?

Leave a Reply

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

What’s the use of a constructor?

The purpose of constructor is to initialize the object of a class while the purpose of a method is to perform a task by executing java code. Constructors cannot be abstract, final, static and synchronised while methods can be. Used to initialize the data members of a class.

Sizin İçin Seçtik  Turkcell TL ile paket nasıl yapılır?

Leave a Reply

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