java LinkedList转化为数组
代码如下
public static void main(String[] args) {
LinkedList<String> linkedlist = new LinkedList<String>();
linkedlist.add("aa");
linkedlist.add("bb");
linkedlist.add("cc");
linkedlist.add("dd");
String[] array = linkedlist.toArray(new String[linkedlist.size()]);
}