Collection 接口的 toArray 方法

Collection 接口的 toArray 方法
方法签名
Object[] toArray() 返回包含此 collection 中所有元素的数组。

T[] toArray(T[] a) 返回包含此 collection 中所有元素的数组;返回数组的运行时类型与指定数组的运行时类型相同。

更多请参考:https://www.geeksforgeeks.org/linkedhashset-toarrayt-method-in-java-with-example/

猜你喜欢

转载自www.cnblogs.com/hglibin/p/11404415.html