Loading...

27.Java Tutorial:Access Modifiers in Java|Public, Protected, Private and Default|Zest Prime

55 1________

Welcome to Zest Prime.
As part of this video we will be understanding the different types of access modifiers in java as mentioned below with an example.
Access Modifiers:
Public: This access modifier is having wider access level.It can be used for class ,method,constructor and variables.
Protected: Visible to the package and all sub classes.
Default:visible to all sub classes of same packages and other packages as well.
Private: This access modifier is having less access level.It can be used for class(inner) ,method,constructor and variables.If we have inner class then we can use private.This kind access modifiers can used only with in the class only.

コメント