Re: cannot cast error java char-array to java string

2009-10-29 Thread Chick Corea
Yes, they both work - and the "#^chars" is much more legible. Many thanks! FYI, to whom it may concern...I think it's worth noting that this simple case gives confusing output from the repl. user=> (new String #^chars (make-array Character/TYPE 3)) "user=> And this: user=> (def

Re: cannot cast error java char-array to java string

2009-10-28 Thread ataggart
Also you can substitute #^"[C" with the more legible #^chars. On Oct 28, 7:27 pm, Alex Osborne wrote: > Chick Corea wrote: > > What is wrong with this code?  I want to instantiate a Java String > > from a Java character-array. > > But I want it to be fast, hence the need to cast per the "warn o

Re: cannot cast error java char-array to java string

2009-10-28 Thread Alex Osborne
Chick Corea wrote: > What is wrong with this code? I want to instantiate a Java String > from a Java character-array. > But I want it to be fast, hence the need to cast per the "warn on > reflection" message. > > user=> (set! *warn-on-reflection* true) > true > user=> (new String #^