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 difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
why the constructor should be used in class,if there is no constructor what will happen?
what do you mean by stream pipelining in java 8? Explain
What is OOPs & Why?
What are the Class Libraries ?
Define "Access specifiers" in java.
Is main a keyword in java?
What is public/private protected in java?
What are null interfaces in JAVA ? and give me some examples?
Can a method be overloaded based on different return type but same argument type?
what is servlet enginee?
Can Anybody tell the diff b/w jdk1.6 and latest version.