Packages Functions, properties and classes, objects and interfaces can be declared on the "top-level", i.e. directly inside a package: // file name: example.kt package foo fun baz() {} class Bar {} If you do not specify any visibility modifier, public is used by default, which means that your declarations will be visible everywhere; If you mark a declaration private, it will only be visible inside the file containing the declaration; If you mark it internal, it is visible everywhere in the same module; protected is not available for top-level declarations.