Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedTransferQueue; public class LinkedTransferQueueOfferExample1 { public static void main(String[] args) throws InterruptedException { LinkedTransferQueue
queue = new LinkedTransferQueue
(); //offer() method insert the element at the tail of queue queue.offer(34); queue.offer(23); queue.offer(64); queue.offer(294); System.out.println("Queue : "+queue); } }
Output