java - register problem
<p>When i try to register a person with the name Eric for example, and then again registrating Eric it works. This should not happen with the code i have. Eric should not be registrated if theres already an Eric in the list. Here is my full code:</p>

<pre><code>     private Person findName(String name) {
        for (Person person : personer) {
            if (person.getName() == name) {
                return person;
            }
        }
        return null;
    }





 private boolean containsName(String name) {

       return findName(name) != null;

 }
</code></pre>
