Explain access modifiers in java.



Explain access modifiers in java...

Answer / Shashank Srivastava

Access Modifiers in Java control the visibility and accessibility of classes, methods, variables, and constructors. They include public (visible everywhere), protected (within package and subclasses), default (only within the same package), and private (only within the class).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Difference between ‘is-a’ and ‘has-a’ relationship in java?

1 Answers  


What is the difference between this() and super() in java?

1 Answers  


What does it mean that a class or member is final?

1 Answers  


What are constants?

1 Answers  


What are integer overflows and underflows and how to handle them?

3 Answers   Wipro,


Variable of the boolean type is automatically initialized as?

1 Answers  


What is ascii format?

1 Answers  


Difference between String & StringBuffer

16 Answers   IBM, Infosys, Tech Mahindra, Wipro,


Explain oops concepts in detail?

1 Answers  


Are floats faster than doubles?

1 Answers  


What are mutable classes?

1 Answers  


Can you extend main method in java?

1 Answers  


Categories