error Casting Object[] 2 String[] !!!!

Hi! i have a LinkedBlockingQueue and by it's method .to Array() i want to cast it's type to String[] (it's initial is Object[])

But i get a ClassCastException

Help?

That's my method basicly a wrapper

public String[] toArray()

{

String[] pool = (String[]) urlPool.toArray();

return pool;

}

and i 'copy' it like this

String[] uL = urlL.toArray();

[535 byte] By [georousa] at [2007-10-2 9:19:52]
# 1
public String[] toArray(){Object temp[]= urlPool.toArray();String[] pool = new String[temp.length];for(int i=0; i<temp.length; i++){pool=(String)temp;}return pool;}- Uday>
UdayTashildara at 2007-7-16 23:26:55 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...