Access Modifiers Access modifiers are used to change the visibility and access privileges for a member. privateThe private keyword modifies access. The private access level is the least permissive. If a member is declared private, it can only be accessed from within the class (including inner/nested classes) or module it was declared. protectedThe protected keyword modifies access. If a member is declared protected, it can be accessed from within the class/module it was declared and from any subclasses or submodules. publicThe public keyword modifies access. The public access level is the most permissive. If a member is declared public, it has no restrictions on access. Share HTML | BBCode | Direct Link