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

Why a dead thread occurs?

0 Answers  


I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.

2 Answers   Oracle,


What are uses of Hash Code?

2 Answers   Cognizant,


Explain about exception propagation?

0 Answers  


What are the advantages of packages in java?

0 Answers  






What is anti pattern in programming?

0 Answers  


Can a private method of a superclass be declared within a subclass?

0 Answers  


java program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.

7 Answers   HCL, Wipro,


Who developed java?

0 Answers  


Difference between error and exception

3 Answers   Nous, TCS,


Explain the differences between public, private, protected and static?

4 Answers  


Is java ee a framework?

0 Answers  


Categories