What is protected and friendly?

Answer Posted / priyavarzhni

Protected: the method of a class os accessed only when the
other class inherits it.
Friendly: no need for inheritance. we can access the methods

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to store image in arraylist in java?

510


Why is singleton instance static?

503


What is lambda programming?

492


Can arraylist hold different types java?

482


Can you override a final method?

578






Which is bigger float or double?

514


I want to persist data of objects for later use. What is the best approach to do so?

589


What is the difference between abstraction and encapsulation?

559


What are the main differences between notify and notifyAll in Java?

581


Why string is not thread safe?

538


Objects or references which of them gets garbage collected?

530


What is the primary benefit of encapsulation?

554


what is synchronization and why is it important? : Java thread

584


What is vector?

587


Where pragma is used?

594