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.

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"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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