Online Java Compiler By
JavaTpoint.com
import java.util.ArrayDeque; import java.util.Deque; public class JavaDequeremoveExample3 { public static void main(String[] args) { Deque
deque = new ArrayDeque<>(); deque.add(56f); deque.add(24.9f); deque.add(58f); Float val = deque.pop(); System.out.println("The first float value that has been popped is : "+val); System.out.println("The remaining deque is given as : "); for (Float float1 : deque) { System.out.println(float1); } } }
Output