Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedTransferQueue; public class LinkedTransferQueueSizeExample1 { public static void main(String[] args) { LinkedTransferQueue
queue = new LinkedTransferQueue
(); queue.offer(34); queue.offer(22); queue.offer(26); queue.offer(215); //will return the total size of queue int a= queue.size(); System.out.println("The size of queue : "+a); System.out.println("Queue : "+queue); } }
Output