clojure Java interop Calling an instance method on a Java object


Example

You can call an instance method using the . special form:

(.trim " hello ")
;;=> "hello"

You can call instance methods with arguments like this:

(.substring "hello" 0 2)
;;=> "he"