Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.ArrayDeque;
import java.util.Deque;

public class Main {
    public static void main(String[] args) {

        Deque<Integer> deque = new ArrayDeque<Integer>(5);

        deque.add(25);
        deque.add(30);
        deque.add(35);

        deque.addFirst(10);
        deque.addFirst(15);
        deque.addFirst(20);

        deque.add(45);
        deque.add(40);

        System.out.println(deque);
    }
}