Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedTransferQueue; public class LinkedTransferQueueContainsExample2 { public static void main(String[] args) { LinkedTransferQueue
queue = new LinkedTransferQueue
(); queue.add(3); queue.add(5); queue.add(7); queue.add(2); int a=7; if(queue.contains(a)) { System.out.println("Your answer is correct."); } else{ System.out.println("Incorrect answer!"); } } }
Output