title: JAVA - Cannot make a static reference to the non-static method
body: <pre><code>public class lookFor {
  
      //Tools
      //It returns the position of an element at the ArrayList, if not found returns -1
      public int User(String target, ArrayList&lt;User&gt; users){
          for(int i = 0; i &lt; users.size(); i++){
              if(users.get(i).getUserName().equals(target)){
                  return i;
              }
          }
          return -1;
      }
  }
  </code></pre>
  
  <p>For some reason, when i try to call "User" <a href="http://i.stack.imgur.com/dyxIb.png" rel="nofollow">This Error appears</a></p>
  
  <p>And asks me to make the "user" method a static method, but i don't know what repercussion will it have.</p>