Don't miss an insight. Subscribe to Techopedia for free.

Subscribe
Advertisements

Public

What Does Public Mean?

Public is a keyword that is used as an access modifier for methods and variables. A variable (field) or a method declared as public is visible to and may be accessed by all classes defined in different packages.

Advertisements

Techopedia Explains Public

The public keyword is used in many object-oriented programming languages (OOPL), including C++, Java, C# and Visual Basic.NET (VB.NET). A public member is loosely bound to a class and less restrictive than a private member. Variables or fields that are declared public have no accessibility restrictions. A private member, however, is only visible in its class.

Advertisements

Related Terms