---
title: "What are the various access specifiers for Java classes?"  
description: "What are the various access specifiers for Java classes?"  
author: "Shrikant Mishra"  
published: 2019-08-27  
updated: 2019-08-27  
canonical: https://www.mindstick.com/forum/95290/what-are-the-various-access-specifiers-for-java-classes  
category: "java"  
tags: ["java", "programming language"]  
reading_time: 1 minute  

---

# What are the various access specifiers for Java classes?

[Access specifiers](https://www.mindstick.com/forum/158071/what-are-the-various-access-specifiers-in-java) for [Java](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming)

## Replies

### Reply by Shrikant Mishra

Into the Java, [access](https://www.mindstick.com/articles/12994/how-foreigners-can-access-blocked-websites-in-china) specifiers are the keywords used before a class name which defines the access scope. The types of access specifiers for classes are:

- Public: Class, Method, Field is accessible from anywhere.
- Protected: Method, Field can be accessed from the same class to which they belong or from the sub-classes, and from the class of the same package, but not from outside.
- Default: Method, Field, the class can be accessed only from the same package and not from outside of its native package.
- Private: Method, Field can be accessed from the same class to which they belong.


---

Original Source: https://www.mindstick.com/forum/95290/what-are-the-various-access-specifiers-for-java-classes

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
