Last active
December 28, 2022 20:12
-
-
Save boraseoksoon/7a3f020e2fb8314da3885d386899ef2a to your computer and use it in GitHub Desktop.
call java from clojure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; https://clojure-doc.org/articles/language/interop/ | |
(doto (java.util.Stack.) | |
(.push 42) | |
(.push 13) | |
(.push 7)) ; ⇒ #<Stack [42, 13, 7]> | |
(.. (java.util.Date.) | |
getTime | |
toString) | |
(-> (java.util.Date.) | |
.getTime | |
.toString) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment