Suppose we have a Collection. What is the best (shortest in LoC in current context) way to transform it to Foo[]? Any well-known
Collection
Foo[]
Where x is the collection:
x
Foo[] foos = x.toArray(new Foo[x.size()]);