@@ -0,0 +1,318 @@
+%0Apublic class Main %7B%0A    public static void main(String%5B%5D args) %7B%0A%0A        Deque d = new Deque();%0A%0A        d.addFirst(1);%0A        d.addFirst(2);%0A        d.addLast(3);%0A        d.addLast(5);%0A        d.addLast(1);%0A        System.out.println(d);%0A%0A        d.removeFirstInstanceOf(1);%0A        System.out.println(d);%0A    %7D%0A%7D%0A

Create Main.java