How can I call a java static method in clojure?

后端 未结 4 1306
耶瑟儿~
耶瑟儿~ 2020-12-05 17:27

I wish to call class on the String class. How can I access this static method?

4条回答
  •  渐次进展
    2020-12-05 18:20

    Class doesn't have a "class" method, nor a "class" member. The symbol String is mapped to the class java.lang.String, if what you want to get is the equivalent of Java's String.class. If you want to call a static method of the String class, the syntax is (String/methodName arg1 arg2).

提交回复
热议问题