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
In how many ways we can do exception handling in java?
What are recursive functions? Give some examples?
What are the different types of inheritance in java?
Can array grow dynamically in java?
Write a code to show a static variable?
What is an immutable class?
How will you print number in reverse (descending) order in BST.
Is main a function?
What are static variables and functions?
In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?
What is command line argument
Is array synchronized in java?
How does thread synchronization occurs inside a monitor?
How an object is serialized in java?
What does flag mean in java?