Online Java Compiler By
JavaTpoint.com
import java.util.ArrayDeque; import java.util.Deque; public class JavaDequeremoveExample_2 { public static void main(String[] args) { Deque
deque = new ArrayDeque<>(); deque.add(76f); deque.add(89.9f); deque.add(60.8f); deque.add(45.1f); Boolean val = deque.remove(60.9f); System.out.println("The float value is present in the deque : "+val); System.out.println("The remaining deque is given as :"); for (Float float1 : deque) { System.out.println(float1); } } }
Output