Public

Last Updated: February 23, 2012

Definition - 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.

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.

This definition was written in the context of Java

Survey: Why Is There Still a Gender Gap in Tech?

Do you work in the tech industry? Help us learn more about why the gender gap still exists in tech by taking this quick survey! Survey respondents will also be entered to win a $100 Amazon Gift Card!

Share this: