ClojureDocs

Nav

Namespaces

object-array

clojure.core

Available since 1.2 (source)
  • (object-array size-or-seq)
Creates an array of objects
1 Example
;; create an array of Java Objects using object-array
;; and demonstrate that it can be used with the Java fill function

user=> (def os (object-array [nil 23.2 "abc" 33]))
#'user/os
user=> (vec os)
[nil 23.2 "abc" 33]
user=> (java.util.Arrays/fill os 31415)
nil
user=> (vec os)
[31415 31415 31415 31415]
user=>
See Also
No see-alsos for clojure.core/object-array
0 Notes
No notes for object-array