What is the default visibility modifier and also list the different types of modifiers?
Answer / Ankush Gupta
In Kotlin, the default visibility for functions, properties, and constructors is public. The other visibility modifiers are private, protected, internal, and open. For types (classes, objects, interfaces), the default visibility is public and the other visibility modifier is internal.
| Is This Answer Correct ? | 0 Yes | 0 No |
How is a function declared? Why are Kotlin functions known as top-level functions?
Is kotlin strongly typed?
Explain the Main features of kotlin which are not available in java?
Can we create uninitialized array in kotlin?
Does Kotlin support primitive Datatypes?
What is the difference between Return Type Unit and Return Type Nothing in Kotlin?
How to create static methods in Kotlin?
What are the advantages of using kotlin?
What does "Null Safety" mean in Kotlin?
Explain kotlin’s null safety?
What are the features available in kotlin but not in java?
What is inner class in Kotlin?