When calling from Kotlin into Java, there is less to consider regarding null safety. Because Kotlin has the more strict type system, the Kotlin code will generally have more information available regarding properties and variables. This does mean that once we make a call over into Java, we may lose some of that type information, but, like we saw before, there are things we can do in Java to help preserve that type information in some situations, such as making use of the@Nullable and @NonNull annotations.
As we've seen in this section, we can easily work with existing Java code from within our Kotlin code base. Existing Java classes may not have as much syntactic sugar available within the project as Kotlin code, but functionally they work side by side with little issue. In the next section, we'll look at moving beyond both Java and Kotlin coexisting in a single project, and will look at how to embrace common Kotlin idioms.