编程语言
首页 > 编程语言> > java collection转换为list

java collection转换为list

作者:互联网

 

public ArrayList(collection<?> extends E> c) {
 elementData = C. toArray();
  size = elementData. length;
  // c.toArray might (incorrectly) not return Object[] (see 6260652)
  if (elementData. getClass() != Object[]. class)
  elementData = Arrays . copyOf(elementData, size, object[].class);
}

 

 

https://www.likecs.com/show-204957615.html

标签:toArray,elementData,java,Object,list,collection,class,size
来源: https://www.cnblogs.com/2008nmj/p/16293449.html