Java access modifiers part 1 with complete explanation

Опубликовано: 20 Май 2026
на канале: Learn Java
149
10

You can learn Java with me as the Java Programming language is being made easily. It would take a period of minimum three months and maximum 6 months to master Java. I would recommend you to watch all my videos to crack any software interviews that would require Java Programming language as a primary skill.

Access Modifers in Java:-
=========================

1. public
2. default
3. protected
4. private

The access modifiers in java specifies that accessibility or visibility or scope of a variable or method or classes or constructors. We use these access modifiers to control the visibility.

class Level Access Modifier:-
=============================

Please be informed that only one class can be specified with the public as an access modifier in a java package.

When a class is defined as a default it means it is visible within the same package not from the different package.

Protected and Private are not allowed strictly in classes.