Pages

From Collection to array

I moved this post to Biting Code, my blog dedicated to JVM languages.

Concrete classes in the Java Collection hierarchy support cloning, but this is not available to the root Collection interface. So, if we don't know the actual type of a collection, we have to fall back to the Collection.toArray() methods.

No comments:

Post a Comment