Who convert linked list to arraylist | Sololearn: Learn to code for FREE!


Who convert linked list to arraylist

9/9/2020 6:59:44 PM

Gerson Zefanias Cumbe

3 Answers

New Answer


Gerson Zefanias Cumbe here you go: https://www.tutorialspoint.com/convert-linkedlist-to-arraylist-in-java#:~:text=A%20LinkedList%20can%20be%20converted,the%20elements%20of%20the%20LinkedList. I hope it helps.


Here you find different possibilities: https://www.techiedelight.com/convert-arraylist-linkedlist-java/


Create a linked list. LinkedList<Object> obj1 = new LinkedList<>(); Create an array list and pass the linked list reference to the array list. ArrayList<Object> obj2 = new ArrayList<>(obj1);