Dear all,
The Collection interface provides the signature of
the method toArray.
In the
Sun's tutorial on collections it says:
The following snippet dumps the contents of c into a newly
allocated array of String whose length is identical to the
number of elements in c:
String[] a = (String[]) c.toArray(new String[0]);
Why does it give the array argument a length of 0? And not the
amount of elements in c?
Best regards,
Gian Franco Casula
[ February 20, 2004: Message edited by: Gian Franco Casula ]
[ February 20, 2004: Message edited by: Gian Franco Casula ]
[ February 20, 2004: Message edited by: Gian Franco Casula ]