This documentation is archived and is not being maintained.

internal Modifier

Declares that a class, class member, interface, or interface member has internal visibility.

internal statement


Required. A class, interface, or member definition.

The internal modifier makes a class, interface, or member visible only within the current package. Code outside the current package cannot access internal members.

Classes and interfaces can be marked with the internal modifier. In the global scope, the internal modifier is the same as the public modifier. Any member of a class or interface can be marked with the internal modifier.

You may not combine the internal modifier with any of the other visibility modifiers (public, private, or protected). Visibility modifiers are relative to the scope in which they are defined. For example, a public method of an internal class is not publicly accessible, but any code that has access to the class can access the method.