赞
踩
我有一个数组,初始化如下:
Element[] array = {new Element(1), new Element(2), new Element(3)};
我希望将这个数组转化成一个ArrayList类的对象。
解决方案
new ArrayList(Arrays.asList(array))