Visibility Modifiers

suggest change

Introduction

In Kotlin, there are 4 types of visibility modifiers are available.

Public: This can be accessed from anywhere.

Private: This can only be accessed from the module code.

Protected: This can only be accessed from the class defining it and any derived classes.

Internal: This can only be accessed from the scope of the class defining it.

Syntax

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents