What happens when constructor is private?

If a constructor is declared as private, then its objects are only accessible from within the declared class . You cannot access its objects from outside the constructor class.

Sizin İçin Seçtik  What are the optional named parameters?

Leave a Reply

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

What happens when constructor is private?

If a constructor is declared as private, then its objects are only accessible from within the declared class . You cannot access its objects from outside the constructor class.

Sizin İçin Seçtik  What does OOPs concept means?

Leave a Reply

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