what is the difference between the "protected and default"
modifiers?

Answer Posted / ravikiran

protected access is with in the same package and subclasses
outside the package
default access is with in the same package only

Is This Answer Correct ?    38 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an example of a conditional statement?

787


what is instanceof operator used in java?

787


What are different access specifiers in java?

767


Is list thread safe in java?

710


Where are register variables stored?

815


Tell me about your ability to work under pressure

1959


What is a “stateless” protocol ?

759


What is the use of parse function in java?

721


What is the requirement of thread in java?

831


What is the epoch date?

744


Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

791


Which is dependent variable?

672


What is function and its uses?

802


What is the exact difference in between Unicast and Multicast object?

1774


What is the += operator called?

803