Which of the following is true about protected access?
A) Protected members may be accessed by methods in the same package or in a subclass, even when the subclass is in a different package.
B) Protected members may be accessed by methods in the same package or in a subclass, but only if the subclass is in the same package.
C) Protected members cannot be accessed by methods in any other classes.
D) Protected members are actually named constants.
Correct Answer:
Verified
Q34: All fields declared in an interface _.
A)
Q35: In _, inheritance is shown with a
Q36: A subclass can directly access _.
A) only
Q37: A subclass may call an overridden superclass
Q38: If a class contains an abstract method
Q40: All methods specified by an interface are
Q41: In the following statement, which is the
Q42: Given the following code: Line 1 public
Q43: A class becomes abstract when you place
Q44: In the following code, which line in
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents