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 regex used for?
If two threads have same priority which thread will be executed first ?
What is java’s garbage collected heap?
Explain static nested classes ?
Does java arraylist maintain insertion order?
What is == mean?
Using callable statement how can you pass out parameters, explain with example?
How can you share data between two thread in Java?
How do you insert a line break?
Is java an ide?
How to declare an arraylist in java?
What does a boolean method return?
Explain polymorphism citing an example.
What is isa relationship?
Can we serialize arraylist in java?