What is the difference between protected and public in Java?

Protected access modifiers allow the data members to be accessed by class, package, subclass (same package), subclass (different package). The difference between public and protected is that public can be accessed from outside class but protected cannot be accessed from outside class .1 Mar 2021

Sizin İçin Seçtik  Kripto para Ethereum nereden alınır?

Leave a Reply

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