>For Collection interface, the declaration of toArray() is:
><T> T[] toArray(T[] a);
>Why do we have <T> at the start of the method declaration?
>Thanks a lot
see http://mindprod.com/jgloss/generics.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
> For Collection interface, the declaration of toArray() is:
> <T> T[] toArray(T[] a);
> Why do we have <T> at the start of the method declaration?
Because the "genius" that came up with the idea for Java generic decided
that this should be the syntax when you have a parametric (generic)
method and need to provide a type parameter.
And you need to have th <T>, otherwise the compiler would not know that
the two T[] in the method signature refer to a type parameter, instead
of just a 'class T".
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/