How to access a method that it declared as protected?
Answer Posted / ranganathkini
If a method is marked protected, only the subclass of that
class can access it. To make it accessible to other classes,
the subclass of that class can override the protected method
and the override can be marked as public making it
accessible to other classes.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is a method in programming?
What kind of variables a class can consist of?
Differentiate between postfix and prefix operators in java.
What are unchecked exceptions in java?
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
What is default exception handling in java?
What is the byte range?
What is the main purpose of java?
Can you write a java class that could be used both as an applet as well as an application?
What are features of java?
What is the core java?
What is Session reduplication and how its done?
What is struts in java?
Can a method be static?
What is parseint?