What is protected and friendly?



What is protected and friendly?..

Answer / 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

More Core Java Interview Questions

what is Dictionary? and what purpose it is used for?

3 Answers  


Can a class be protected in java?

0 Answers  


why we use merge option in hybernate pls give a ex snippet

0 Answers   CoreObjects,


What is widening and narrowing in java? Discuss with an example.

0 Answers   Amdocs,


How many wrapper classes are there in java?

0 Answers  


What is java util function?

0 Answers  


What is an immutable class? How to create an immutable class?

0 Answers  


What are the problems faced by java programmers who don't use layout managers?

0 Answers  


While opening the file, what type of exceptions can be caught?

3 Answers  


What is the association?

0 Answers  


What are three types of loops in java?

0 Answers  


Why do we need to override equals() and hascode() method of object class?

1 Answers   Cognizant,


Categories