Qus:    Can we change the scope of the overridden method in the subclass?
Mar 11, 2021 11:44 1 Answers Views: 796 RANJIT
Prev Next
Answers (1)
SANJAY Mar 12, 2021 09:50
Answer:   Yes, we can change the scope of the overridden method in the subclass. However, we must notice that we cannot decrease the accessibility of the method. The following point must be taken care of while changing the accessibility of the method.
o The private can be changed to protected, public, or default.
o The protected can be changed to public or default.
o The default can be changed to public.
o The public will always remain public.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect