liveBook · Manning

Interop

Java interoperability is the ability of code in another language or runtime to access and work with Java code, types, libraries, and functionality.

How 2 Manning books explain it

Clojure: The Essential Reference

Java interoperability is Clojure's capability to call Java classes, methods, and libraries from Clojure code.

How it is used
Uses interop to access Java SDK capabilities and provide Clojure entry points to Java methods.
How deep it goes
Identifies core access forms and works through overload selection and inlining, but does not detail the Java SDK examples.
Examples
Compares ordinary and inlined wrappers around an overloaded Java addition method, including their selected overloads and numeric results.
What you can do after
Apply it via Java access forms, and evaluate when an inlined Clojure wrapper improves overload selection.

Read how Clojure: The Essential Reference explains interop →

Kotlin in Action, 2E

Java interoperability is the ability of Kotlin code to interact directly with Java code and libraries, including exchanging compatible string values without conversion.

How it is used
Connects Kotlin code to existing Java libraries, frameworks, APIs, and JVM development tools.
How deep it goes
Explains shared strings and collections, Java-callable extensions, SAM lambdas, constructors, and annotated nullability; defers collection type-system details.
Examples
Demonstrates Java collection implementations, a Java-callable lastChar extension, downloader constructors, and an OnClickListener lambda.
What you can do after
Apply it via Java APIs by sharing strings and collections, passing SAM lambdas, calling extensions, and interpreting Java nullability annotations.

Read how Kotlin in Action, 2E explains interop →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.