Fork me on GitHub

@peter.d > Is it somehow similar to how the Integer wrapper-class works in Java? Exactly the same. That's what you're calling into there, using Java interop.


So you could say that in this case, Integer. works the same as Integer.parseInt(String s) ? If so, how does it know it's that exact method, and not any other on the Integer-class, like decode, getInteger, parseUnsignedInt etc? Sorry if this is a stupid question but I really want to understand. 🙂


(which does exactly the same thing as Integer.parseInt)


You could also call (Integer/parseInt “42”) for the latter.


The (TypeName. foo) syntax is how you call Java constructors.


(type name then ‘.’)

tokenshift19:10:54 has all of the ways to call a Java method from Clojure, though you have to scroll down to get to the part that explains calling constructors.


Hey, really really beginner question, but I have been reading about Clojure project structure and the relationship with namespaces and folder structure. Does something like Cider have any automatic way of helping you with this like adding namespaces to files based on where there are created etc.