How to access a method that it declared as protected?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ravikiran(aptech mumbai)
a protected method can be accessed with in the same packege
and subclasses outside of the package
| Is This Answer Correct ? | 2 Yes | 1 No |
What is the use of :: in java?
what is data binding? give the example
Is void a return type?
What are new features introduced with java 8 ?
In Java list the methods that can be overridden?
What are access specifiers in java ?
0 Answers Akamai Technologies,
Are variables stored in ram?
What is use of static method?
Is java util list serializable?
What is return null in java?
How do you reverse a string in java without using string buffer?
how to minimize the functionality to will not force garbage collector?