Public Modifier: The public modifier is another access modifier that allows unrestricted access to members from any other part of the program.
Protected Modifier: The protected modifier grants access to members within the same package or subclasses outside the package but restricts access from unrelated classes.
Default Modifier (Package-private): When no explicit access modifier is specified, members have default access within the same package but are inaccessible from outside the package.