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 intern method in java?
What is a map? What are the implementations of map?
What is get () in java?
Can a constructor call another constructor?
What is the difference between variable declaration and variable initialization?
Why java uses the concept of the string literal?
What do you mean by chromounits in java8?
How do you implement tree mirroring in java?
why java does not support unsigned keyword?
What is an object in java?
How many characters is 16 bytes?
How do you read a char in java?
What is collections framework?
Why is the type for real numbers called double?
What is object in java?