Given the code fragment:
Which two modifications, made independently, enable the code to compile?
A.
Make the method at line n1 public.
B.
Make the method at line n2 public.
C.
Make the method at line n3 public.
D.
Make the method at line n3 protected.
E.
Make the method at line n4 public.
Answer is C & D.
Overriding method needs to have same or more accessible access modifier than that in its Super class.
ie in order for a public method to be overridden the overriding method must be public. protected or public works for a protected method as in this question. etc etc
with your answer line 4 will not compile
C,E