What are access specifiers available in java?



What are access specifiers available in java?..

Answer / Amardeep Kumar

Java provides four access specifiers: private (accessible only within the same class), protected (accessible within the same package and subclasses of other packages), default (accessible within the same package), and public (accessible from any class).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can any one say how will sort map objects in java?

2 Answers   TCS,


Write the algorithm to check the number non-leaf nodes in a tree.

1 Answers   Amdocs,


Is integer a class?

1 Answers  


What is escape analysis algorithm in JVM and how garbage collection actually worked n how it transfer the objects from one kind of space to other?

0 Answers  


What is boolean logic?

1 Answers  


Does anyone still use java?

1 Answers  


Explain what do you mean by functional overloading in java?

1 Answers   Maveric, Verifone,


What is an Iterator interface?

2 Answers  


What are the ways to instantiate the class class?

1 Answers  


What is a nested structure?

1 Answers  


How to do validation of the fields in any project ?

2 Answers  


What is the difference between Array and Hash Table?

1 Answers   Impetus,


Categories