Internal visibility modifier (internal)

The internal visibility modifier is used to declare a member visible within the same module. A module is a collection of Kotlin files compiled together. A module may be a Maven project, a Gradle source set, and IntelliJ IDEA module, or a set of files compiled with an Ant task invocation. Using the internal modifier is similar to using other visibility modifiers:

internal class Person { }

Having understood access and visibility modifiers, we can continue with the implementation of the Block class. The next thing we need to do is create a constructor for the class that initializes the instance variables we have created to their initial states. Constructor definitions in Java are syntactically different ...

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.