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:
Public
Answers
Answered by
1
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 ☺
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 ☺
Answered by
0
HEya friend,
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!!!!!!!!!!
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!!!!!!!!!!
Similar questions