import java.util.ArrayList;
import java.util.LinkedList;
public class Main {
public static void main(String[] args){
ArrayList<String> arrList = new ArrayList<>();
arrList.add("Mango");
arrList.add("Apple");
arrList.add("Orange");
System.out.println(arrList);
// ArrayList to LinkedList
LinkedList<String> linkList = new LinkedList<>(arrList);
System.out.println("Linked List:");
System.out.println(linkList);
}
}
// append element to head of array
Deque<String> deque = new LinkedList<>();
deque.add("two");
deque.add("one");
deque.addFirst("three");
//prints "three", "two", "one"