title: Deque java.lang.NoSuchMethodError: main
body: <p>I have been working on a deque (double ended que) class. I still have a lot of work to do on all of the methods but want to be able to test what I code as I go. I am getting an Exception in thread "main" java.lang.NoSuchMethodError: main. I would appreciate any help in fixing this.</p>
  
  <p>Thanks in advance, here is my code:</p>
  
  <pre><code>class DNode&lt;E&gt;
  {
      private E data;
      private DNode&lt;E&gt; lLink, rLink;
  
      public DNode(E iData, DNode&lt;E&gt; lefLink, DNode&lt;E&gt; riteLink)
      {
          data = iData;
          rLink = riteLink;
          lLink = lefLink;
      }
  
      public E getData()
      {return data;}
  
      public void setData(E aData)
      {data = aData;}
  
      public DNode&lt;E&gt; getRightLink()
      {return rLink;}
  
      public void setRightLink(DNode&lt;E&gt; righty)
      {rLink = righty;}
  
      public DNode&lt;E&gt; getLeftLink()
      {return lLink;}
  
      public void setLeftLink(DNode&lt;E&gt; lefty)
      {lLink = lefty;}
  
      public void addNodeAfter(E item)
      {rLink = new DNode&lt;E&gt;(item, this, rLink);}
  
      public void removeNodeAfter()
      {rLink = rLink.getRightLink();}
  }
  
  class Deque&lt;E&gt;
  {
      private int manyNodes = 0;
      private DNode&lt;E&gt; front, rear;
  
      public Deque()
      {
          manyNodes = 0;
          front = null;
          rear = null;
      }
  
  
      public boolean isEmpty()
      {return (manyNodes == 0);}
  
      public void addAtEnd(E item)
      {
          if(isEmpty())
          {
              front.addNodeAfter(item);
              rear = front;
          }
          else
          {
              rear.addNodeAfter(item);
              rear = rear.getRightLink();
          }
          manyNodes++;
      }
  
      public void addtAtFront(E item)
      {
          if(isEmpty())
          {
              front.addNodeAfter(item);
              rear = front;
          }
          else
          {
              front.addNodeAfter(item);
          }
      }
  
      public void removeFirst() throws NoSuchFieldException
      {
          if(manyNodes == 0)
              throw new NoSuchFieldException();
          front.removeNodeAfter();
      }
  
      public void removeLast() throws NoSuchFieldException
      {
          if(manyNodes == 0)
              throw new NoSuchFieldException("Ya dun goofed");
          rear.removeNodeAfter();
      }
  
      public void print()
      {
          DNode&lt;E&gt; trace;
          for(trace = front; trace.getRightLink() != null; trace = trace.getRightLink())
              System.out.println(trace.getData());
      }
  }
  
  
  class DequeRun
  {
      public static void main(String[] args)
      {
          Deque&lt;String&gt; test1 = new Deque&lt;String&gt;();
          test1.addAtEnd("Ryan");
          test1.addAtEnd("Mike");
          test1.print();
      }
  }
  </code></pre>