title: Removing even numbers from a linked list not working at the tail node?
body: <pre><code>void deleteEven() {
          boolean con = false;
          Node add;
          Node move;
          move = head;
          if (move.data % 2 == 0) {
              head = move.next;
              con = true;
          }
          add = move;
          move = move.next;
          while (move != null) {
              if (move.data % 2 == 0 ) {
                  add.next = move.next;
                  con = true;
              }
              add = move;
              move = move.next;
          }
          if (!con)
              System.out.println("No even numbers in list");
      }
  </code></pre>
  
  <p>It works for every node except the tail.
  if linked list is [5,4,3,2,2]
  the result is [5,3,2]
  How to fix that?</p>