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
why java uses class level type casting ?
What is java lang object?
Differentiate between a class and an object.
What is static import in java?
Explain different states of a thread in java?
Explain the private protected method modifier?
What happens when I use / and % with a negative numerator?
How will you load a specific locale?
What is the difference between ArrayList and Vector? which one is better in Java
What is currentthread()?
How to change value in arraylist java?
What does file separator do in java?
What is the difference between method overriding and overloading?
What is flush () in java?
How to declare an arraylist in java?