- Learn Kotlin Programming(Second Edition)
- Stephen Samuel Stefan Bocutiu
- 104字
- 2021-06-24 14:13:28
Visibility modifiers
Usually, not all functions or classes are designed to be part of your public API. Therefore, it is desirable to mark some parts of your code as internal and not accessible outside of the class or package. The keywords that are used to specify this are called visibility modifiers.
There are four visibility modifiers—public, internal, protected, and private. If no modifier is given, then the default is used, which is public. This means they are fully visible to any code that wishes to use them.
Java developers will know that this contrasts to the Java default, which has package-level visibility.
推薦閱讀
- Java語言程序設計
- 流量的秘密:Google Analytics網站分析與優化技巧(第2版)
- Redis Applied Design Patterns
- Java入門很輕松(微課超值版)
- 青少年美育趣味課堂:XMind思維導圖制作
- Java Web程序設計
- 薛定宇教授大講堂(卷Ⅳ):MATLAB最優化計算
- jQuery開發基礎教程
- Python機器學習基礎教程
- Babylon.js Essentials
- ASP.NET程序開發范例寶典
- Building Dynamics CRM 2015 Dashboards with Power BI
- Learning VMware vSphere
- Unity 5.X從入門到精通
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器