title: Skip every other element in a linked list?
body: <p>I am trying to delete every other element in a linked list in Java.</p>
  
  <pre><code>public static IntNode everyOther(IntNode front){
  
      IntNode link = front;
  
      if(link.next == null){
          return;
      }
  
      while(link.next != null){
          link.next = link.next.next;
      }
      return
  }
  </code></pre>
  
  <p>I have this so far, but it throws an error when I try to execute.</p>