the [ in front means an array. the String.format takes java varargs,
which the compiler de-sugars as an array. easier to use clojure's own
format function. which calls String's format method in the end, but
you don't have to create the array manually.

On Wed, Feb 17, 2010 at 9:21 AM, Phil <[email protected]> wrote:
> Sorry for the newbie question, but this seems a strange error
> message.  Either it is saying that a java.lang.Integer cannot be cast
> to an Object, or it is saying that it can't be cast to a particular
> object.  Some enlightenment would be appreciated.
>
> user=> (. String format "%d" 28)
> java.lang.ClassCastException: java.lang.Integer cannot be cast to
> [Ljava.lang.Object; (NO_SOURCE_FILE:0)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to