LinkedList<Integer> list = new LinkedList<>();
list.add(1);
list.add(2);
list.add(3);
list.add(4);
LinkedList<Object> list1 = new LinkedList<Object>(list);
//遍历方式
System.out.println(list);
(Collection<? extends E> c )=(LinkedList c )
LinkedList<Integer> list = new LinkedList<>();
list.add(1);
list.add(2);
list.add(3);
list.add(4);
LinkedList<Object> list1 = new LinkedList<Object>(list);
//遍历方式
System.out.println(list);
(Collection<? extends E> c )=(LinkedList c )