There are four types of access modifiers available in java Default – No keyword required Private Protected PublicHere you can understand what is access modifiers What are the difference between public private protected and defaultthankyou for watchingplease subscribe In Java, there is the provision of numerous access modifiers for setting the levels you want from classes, as well as the fields, methods, and constructors in your classes A member has the package or default accessibility when no access modifier is specified You should possibly minimize access levels, whenever dealing with encapsulation, in Java
Access Modifiers In Java