Which is the default modifier for a method, variable, class?
Answer / Ateequr Rehman
The default access modifier for methods and properties in Kotlin is private within the file they are defined. The default access modifier for classes is public.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the Elvis Operator?
How to handle null exceptions in Kotlin programming?
What are the features available in kotlin but not in java?
What are Data classes ? Aren’t they available in Java ?
How do you migrate the code from Java to Kotlin ?
What is the difference between object { } block and companion object { } code block in Kotlin?
Which is the default modifier for a method, variable, class?
What is the difference between const vs val?
Does Kotlin provide any additional functionalities for standard Java packages or standard Java classes?
Can kotlin code be executed without jvm?
What are the advantages of using kotlin?
What is !in operator in Kotlin?