what is the difference between the "protected and default"
modifiers?
Answer Posted / naveen
default is accessble with in package only, protectd is also
same but if any class out side the package extends the
protected class then it is also accesesible means all sub
classes(what ever the package) of protechted class can
access the protected class what ever the package
i know this answer if any one has another one or if it is
not correct answer than post a correct answer
| Is This Answer Correct ? | 64 Yes | 7 No |
Post New Answer View All Answers
What is a singleton factory?
What is run time allocation?
What is procedure writing?
When will you define a method as static in Java?
What does n mean?
What do you mean by singleton class in java?
Which are different kinds of source code?
How a variable is stored in memory?
Who found java?
Explain when classnotfoundexception will be raised ?
What is the advantage of functional interface in java 8?
How does hashset works in java?
Explain exception chaining in java?
What is console based application in java?
When is the finalize() called? What is the purpose of finalization?