Open access applies only to classes and class members, and it differs from public access as follows: - Classes with public access, or any more restrictive access level, can be subclassed only within the module where they’re defined. - Class members with public access, or any more restrictive access level, can be overridden by subclasses only within the module where they’re defined. - Open classes can be subclassed within the module where they’re defined, and within any module that imports the module where they’re defined. - Open class members can be overridden by subclasses within the module where they’re defined, and within any module that imports the module where they’re defined.
(edited)### public Apply this modifier to a declaration to indicate the declaration can be accessed and subclassed by code in the same module as the declaration. Declarations marked with the public access-level modifier can also be accessed (but not subclassed) by code in a module that imports the module that contains that declaration.
(edited)