+ 1
What is the use of protected access specifier in Java.
4 Antworten
+ 6
Protected isn't used ask that often. It means that the value that it specifies can only be modified (or the function that it specifies can only be accessed) within the class or by any derived classes.
+ 4
@Viarj
parotected can only...
public can also...
+ 1
Same goes for public, data members and methods declared public can also be modified and accessed within the class or derived class so what's the diffrence?