Online Java Compiler By
JavaTpoint.com
import java.util.ArrayDeque; import java.util.Deque; public class JavaDequeresizeExample1 { public static void main(String[] args) { Deque
deque = new ArrayDeque<>(); deque.add(55.8f); deque.add(22.3f); deque.add(89f); deque.add(22.3f); System.out.println("The final deque is given as : "); for (Float float1 : deque) { System.out.println(float1); } int size = deque.size(); System.out.println("The size of the deque is : "+size); } }
Output