What is the difference between constructor and methods?

Constructor is used to initialize an object whereas method is used to exhibits functionality of an object . Constructors are invoked implicitly whereas methods are invoked explicitly. Constructor does not return any value where the method may/may not return a value.

Sizin İçin Seçtik  Dünyada kaç yazılım mühendisi var?

Leave a Reply

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