How can I call a java static method in clojure?

后端 未结 4 1300
耶瑟儿~
耶瑟儿~ 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:06

    You can call a static method using (ClassName/methodName arguments).

    However class is not a static method, it's a java keyword and you don't need it in clojure. To get the Class object associated with the String class, just use String.

提交回复
热议问题