- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Access Modifiers in Java
Java provides a number of access modifiers to set access levels for classes, variables, methods, and constructors. The four access levels are -
- default - Visible to the package. No modifiers are needed.
- private - Visible to the class only.
- public - Visible to the world.
- protected - Visible to the package and all sub classes.
Advertisements