1 | public int[][] merge(int[][] intervals) { |
- ArrayList to Array:
someArrayList.toArray()
Object[] toArray()
: 直接调用返回的是Object[]
类型的array, 一般都不这样用<T> T[] toArray(T[] a)
:a
: the array into which all elements of list are to be stored, if it is big enough; otherwise, a new arrya of the same type is allocated for this purpose.