store/[org.clojure/clojure "1.8.0"] clj::clojure.core/aget

Official Documentation

Add notes
Arities
==================================================
   [array idx]
   [array idx & idxs]

Docstring
==================================================
  Returns the value at the index/indices. Works on Java arrays of all
  types.

Source

(defn aget
  "Returns the value at the index/indices. Works on Java arrays of all
  types."
  {:inline (fn [a i] `(. clojure.lang.RT (aget ~a (int ~i))))
   :inline-arities #{2}
   :added "1.0"}
  ([array idx]
   (clojure.lang.Reflector/prepRet (.getComponentType (class array)) (. Array (get array idx))))
  ([array idx & idxs]
   (apply aget (aget array idx) idxs)))

Example 1

Edit
;; create two arrays
(def a1 (double-array '(1.0 2.0 3.0 4.0)))
;; => #'user/a1

(def a2 (int-array '(9 8 7 6)))
;; => #'user/a2

;; get an item by index
(aget a1 2)
;; => 3.0

(aget a2 3)
;; => 6

;; 2d array and 2 indicies
(def a3 (make-array Integer/TYPE 100 100))
;; => #'user/a3

(aget a3 23 42)
;; => 0

Uses on crossclj