Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Object-oriented scope

Shulou Source: shulou.com Published: 2022-06-01 04:34:37 10月03日 Update

Scope

Scope keyword

Public:public indicates that the data member and member function are open to all users, and all users can call them directly.

Protected:protected is public for children and friends, and it can be used freely without any restrictions, while for other external class,protected, it becomes private.

Private:private means private, private means that no one can use it directly except class himself, private property is sacred and inviolable, even children and friends can not use it.

Tags: Private function children that is members friends users freedom keywords functions meaning data property openness restrictions objects Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Redmi Shulou Tech Info OPPO Reno vpn