Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequeContainsExample2 { public static void main(String[] args) { LinkedBlockingDeque
deque = new LinkedBlockingDeque
(); deque.add("Avijit"); deque.add("Arnavi"); deque.add("Himanshu"); deque.add("Tinku"); deque.add("Harshit"); String str = "Harshit"; if(deque.contains(str)){ System.out.println(str+" is present."); } else{ System.out.println(str+" is absent."); } } }
Output