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


Please Help Members By Posting Answers For Below Questions

How is it possible for two string objects with identical values not to be equal under the == operator?

529


What is a stringbuilder?

513


What does substring mean?

515


Are registers volatile?

534


What is a boolean output?

525






What is heterogeneous in java?

496


How to access arraylist elements in java?

494


This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }

563


What is extension method in java?

563


When do you call copy constructor?

557


How do you sort arraylist in descending order?

578


Explain oops concepts in detail?

577


What does void * mean?

537


What does it mean that strings are immutable?

576


What do you mean by exception handling in Java?

662