Java Programming: Access Control Which of this access specifier must be used for classes, so that it can be inherited by another sub class? 1) Public 2) Private 3) Protected 4) None of the above
siddhartharao77
Its okk.. I want to leave this topic by saying that "If that answer is not correct, then it won't be brainliested. But I would like to say that "Only public members can be accessed out of class, private members are not accessed by external classes.Protected members access only by its sub classes". Still my answer is public.
Answers & Comments
The answer is (3)PROTECTED
A protected member is accessible within all classes in the same package and within subclasses in other package
public can be accessed every where according to the POLP we choose protected
HOPE IT HELPS!!!!!!!!!!
Verified answer
Hii frnd,your answer will be "public"
this access specifier can be inherited from any sub class.
hope it helped u
please mark as brainliest if it helps u ☺