I came across an interesting piece of code while learning morphadorner manipulations. The code is below:
Collection<Object>[] nodes = someFunction()
My question is in what scenario is this declaration necessary and/or valid:
Collection<Object>[] nodes
I have seen:
Collection<Object[]> nodes
But cannot think of a scenario where I would need an Array
of Collections
. So again the question is, when would this be used?
This is the javadoc:
java.util.Set<java.lang.String>[]
findNames(java.lang.String text)
Returns names from text.