0

If i want to call java methodes or fields in clojure i can use the dot special form, since clojure strings are implemented as java strings i think i should be able to call the String methodes of java by something like (.toUpperCase "clojure") which works. My question is why can i not access to all of the java Methods in the same manner? For example (.valueOf 3) which is this static method gives me an error.

asked Sep 29, 2015 at 9:48
1

1 Answer 1

2

Is's a static method, so also in java you would call String.valueOf(3):

user=> (String/valueOf 3)
"3"
answered Sep 29, 2015 at 10:07
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.