answersLogoWhite

0

What is public access?

User Avatar

Anonymous

8y ago
Updated: 11/10/2021

In a class definition, the keyword "public:" denotes that all the following members (both variables and methods) are accessible to all consumers of the class. The access specifier remains in force until another access specifier is encountered, however the same specifier may be repeated throughout the definition, and they may appear in any order.

Note that a class always has full access to all of its own members, regardless of the access specifiers. However, class members may be public, protected or private. This determines how accessible those members are to the consumers of the class. In other words, they determine how much of the interface you expose outside of the class.

Unless otherwise specified, all class members are private. Private members are only accessible to the class itself, and friends of the class (whether those friends are entire classes, individual class methods, or individual functions).

Protected members are similar to private members, but are also accessible to derived classes.

Public members are accessible to all consumers of the class.

User Avatar

Mina Hyatt

Lvl 10
3y ago

What else can I help you with?

Related Questions

When was Public Access created?

Public Access was created in 1993.


What is the duration of Public Access?

The duration of Public Access is 1.5 hours.


When did The Public-Access Computer Systems Review end?

The Public-Access Computer Systems Review was created in 1990.


Do public libraries in the UK all have free access to the same public records?

What free public records can I access from a public library in the UK? Does it depend on which library I visit?


What is the use of public access specifier?

use of public access specifier iswe can access the class members(methods,variables) out side the class using class reference


What is Public Internet Access points?

it is a access point that is free to use


Which is public to all access class or struct or function or variable?

The default access specifier for a class is private. The default access specifier for a struct is public. It does not matter if it is a function or a variable.


Should corporations be allowed to access the teenage market in public schools?

Should corporations be allowed to access the teenage market in public schools?


Where are public beaches?

Beaches that the public are allowed access to as opposed to private ones


When did consumers have public access to Internet?

1990


What does In public mean?

The keyword public is an access specifier. A variable or a method that is declared public is publicly accessible to any member of the project. Any class or method can freely access other public methods and variables of another class.


Advantages of online public access catalog?

Advantages of Online Public Access Catalogue (OPAC) : -instant informationeasier to user to find bookseasy to use