What are Modifiers in OOP?

There are three access modifiers: public – the property or method can be accessed from everywhere. This is default. protected – the property or method can be accessed within the class and by classes derived from that class. private – the property or method can ONLY be accessed within the class.

Sizin İçin Seçtik  What are the 3 access modifiers?

Leave a Reply

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