Online Java Compiler By
JavaTpoint.com
import java.util.ArrayList; import java.util.List; import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequeAddAllExample1 { public static void main(String[] args) { LinkedBlockingDeque
deque = new LinkedBlockingDeque
(); List
list = new ArrayList
(); list.add("Himanshu"); list.add("Janak"); list.add("Ravi"); //addAll() method adds all the elements of the collection into the deque deque.addAll(list); System.out.println("Deque : "+deque); } }
Output