OIC - oops, my bad - I didn't look too closely at the API, but should have noticed the difference in parameters.
It was late, I was tired, what can I say? OTOH maybe I should get more sleep...
Type: Posts; User: dlorde
OIC - oops, my bad - I didn't look too closely at the API, but should have noticed the difference in parameters.
It was late, I was tired, what can I say? OTOH maybe I should get more sleep...
Why make it complicated, why not just:
import java.lang.reflect.Array;
...
Object anArray = Array.newInstance(String.class, 4);
ETA - oh wait, I was forgetting, you need the Class.forName(..)...
You can do this with the Array class. It is part of the reflection package, but it is designed for just this kind of thing, and it does create real arrays (although they're handled as Objects).