clojure Java interop Referencing an instance field on a Java Object


Example

You can call an instance field using the .- syntax:

(def p (java.awt.Point. 0 1))
(.-x p)
;;=> 0
(.-y p)
;;=> 1