Kotlin interoperates directly with Java code and libraries on the JVM. It uses standard Java classes where that makes existing APIs familiar and reusable, while adding Kotlin syntax and library operations around them. IDE navigation can cross Kotlin and Java, and Java-to-Kotlin conversion can help bring existing code forward. section 1.6 section 3.1
Strings cross the Kotlin–Java boundary unchanged: a Kotlin String is the same string used by Java. Pass Kotlin-created strings to Java methods, and use Kotlin string operations on strings returned by Java, without conversions or wrapper objects. section 3.5
Use Java collections without conversion
Kotlin collection factories create standard Java collection classes, so a list or map can move between Kotlin and Java APIs directly. Kotlin presents collection interfaces as read-only by default, yet supplies operations such as last(), shuffled(), and sum() on the same underlying Java collections. section 3.1
button.setOnClickListener { #1
println("I was clicked!")
}
A Kotlin lambda can be passed directly where a Java API expects a single-abstract-method listener. Its parameter list corresponds to the interface method, avoiding the anonymous-class form required by older Java code. section 5.2
Extensions remain callable from Java. A top-level Kotlin extension compiles to a static method whose first argument is the receiver; the generated Java class name comes from the Kotlin file name. Java can statically import that method, although the Kotlin call is usually more readable. section 3.3.2
Constructor design may also follow Java API shapes. Secondary constructors are useful when a class needs multiple parameter lists or must initialize a Java superclass through different superclass constructors; each secondary-constructor path must reach a base-class constructor. section 4.2.2
Java nullability needs explicit care because Java does not encode it in its type system. Kotlin recognizes supported Java nullability annotations: @Nullable String becomes String?, and @NotNull String becomes String. Without annotations, Kotlin represents the Java type as a platform type. section 7.12
Interoperability is not limited to objects and collections. Kotlin lambdas work with Java functional interfaces such as Runnable, Callable, and listener interfaces, letting Kotlin call Java APIs with concise, idiomatic callback code. section 5.0 section 5.2

