定义
The Collection interface provides the toArray() method, which returns an array of Object for the collection.
It also provides the toArray(T[]) method, which returns an array of the T[] type
理解
toArray()方法用来把collection转化成array,但是如果不传参数的话,出来的array类型就会是object[]。想要改变数组的类型,出来的时候就需要把参数调整。