Browse Clojure Foundations for Java Developers

Calling Java Methods from Clojure

Interop call forms (`.`, `Class/staticMethod`) and how to avoid reflection surprises.

Calling Java from Clojure is direct: you are still on the JVM. The main differences from Java are syntactic and ergonomic, not “capability” differences.

Common shapes you will see:

1(.substring "hello" 1 3)  ;; instance method => "el"
2(Math/abs -3)             ;; static method   => 3

The practical gotcha is reflection: if Clojure cannot infer the target type for an interop call, it may reflect at runtime. That is usually fine at the edges, but it can become a real cost inside tight loops. This section helps you recognize the call forms and know when type hints are worth it.

In this section

Revised on Friday, April 24, 2026