What is a constructor used for?

Constructor is used to initializing objects of a class and allocate appropriate memory to objects . That is, it is used to initialize the instance variables of a class with a different set of values but it is not necessary to initialize.

Sizin İçin Seçtik  How do I get 5G on my Samsung Galaxy S20 Ultra?

Leave a Reply

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