October 2019
Intermediate to advanced
434 pages
11h 54m
English
Your Kotlin and Java files can exist within the same source directories inside your project. You do not need to separate Kotlin and Java into homogeneous packages, modules, and so on. In general, your Kotlin and Java files will follow similar conventions for package naming and imports; however, Kotlin files can specify an arbitrary package name. This means that even though two files may exist within the same directory, they may have different declared packages, and therefore might require an explicit import.
Let's revisit the AuthScreen example:
internal class AuthScreen private constructor(){ ...}
Both AuthScreen.kt and Main.kt are within the same folder, and exist within the default global package, so AuthScreen can be ...
Read now
Unlock full access