GIAC
GSSP-JAVA · Question #59
You work as a Software Developer for Relix Inc. You have written the following code . class Test {protected void show(){}} Now you want to override the method show() in the subclass of Test. Which…
The correct answer is A. protected D. public. See the full explanation below for the reasoning.
Question
You work as a Software Developer for Relix Inc. You have written the following code . class Test {protected void show(){}} Now you want to override the method show() in the subclass of Test. Which of the following access specifiers can you use to override this method? Each correct answer represents a complete solution. Choose two.
Options
- Aprotected
- Bdefault (no access specifier)
- Cprivate
- Dpublic
How the community answered
(23 responses)- A70% (16)
- B9% (2)
- C22% (5)
Community Discussion
No community discussion yet for this question.