In Java, I can do the following to format a floating point number for display:
String output = String.format("%2f" 5.0);
System.out.println(output);
In theory, I should be able to do the same thing with this Clojure:
(let [output (String/format "%2f" 5.0)]
(println output))
However, when I run the above Clojure snippet in the REPL, I get the following exception:
java.lang.Double cannot be cast to [Ljava.lang.Object;
[Thrown class java.lang.ClassCastException
What am I doing wrong?