Creating queue

Report a typo

Create ArrayDeque named queue and enqueue the following four numbers 2, 0, 1, 7.

The code for displaying the queue is already written.

Sample Input 1:

Sample Output 1:

[2, 0, 1, 7]
Write a program in Java 17
import java.util.*;

public class Main {

public static void main(String[] args) {
// write your code here
System.out.println(queue);
}
}
___

Create a free account to access the full topic