Permalink
Browse files

static, enum, & nested class example

  • Loading branch information...
Jay Fields
Jay Fields committed Dec 24, 2011
1 parent a6260d3 commit 2a56ba343c7365d48478b0281e7d3694011105f5
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/clojure/interop/core.clj
@@ -1,4 +1,12 @@
(ns interop.core)
(defn print-string [arg]
(println (.replace arg "hello" "goodbye")))
;;; calling a static method
(println (String/valueOf true))
;;; using an enum
(println (java.util.concurrent.TimeUnit/SECONDS))
;;; using a Java nested (inner) class. Note, in Clojure you
;;; use a $ instead of a .
(println (java.util.AbstractMap$SimpleEntry. "key" "val")))

0 comments on commit 2a56ba3

Please sign in to comment.