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 are alternatives to java serialization?
Is a class an object?
What is the most important feature of java? What is an interface?
What is currentthread()?
What is classpath?
How many objects are created for a singleton class
How do you declare an array in java?
What is java lang string?
Can we access instance variables within static methods ?
how an we achive multiple inhetitance in java using interface..??
how to write a server program and sending the mails to the server using smtp protocol please help me
What is java class writing rules?