title: Check if element of linked list exists
body: <p>I am trying to determine if the value is a member in the link. if it is a member, it will return true otherwise it returns false. I try to do this</p>
  
  <pre><code>public boolean member(Integer val){
      if(node.val.equals(val) || node.next.val.equals(val)){
          System.out.println("true");
          return true;
      }
      return false;
  }
  </code></pre>
  
  <p>However, it only check the value of the head and value of the next of the head. What would be other way to check the value of all node?</p>