Visibility modifiers define how your declarations are accessible from other classes and packages. In Kotlin you can use the same modifiers that are found in Java, private, protected, and public.
Private visibility modifiers restrict access to the same class or a file. And public opens the access to everybody, no matter where they are trying to access a member from.
Java also has a fourth visibility modifier, package-private, which is also a default visibility modifier (if you don’t specify a visibility modifier, then package-private is implicitly applied). Package-private in Java means that declarations are visible only inside the same package. It is easy to bypass this visibility modifier. In your code, you can declare a package with the same name as the one you wish to import from and thus break the access restriction. This is one of the reasons Kotlin doesn’t have the package-private modifier. Instead, Kotlin has a similar one, internal. Internal restricts visibility...