Comparing names given method header?
<p>Given the header: </p>

<pre><code>public boolean equals(Name otherName)
</code></pre>

<p>I'm supposed to compare two name objects for equality. What I have right now is: </p>

<pre><code>public boolean equals(Name otherName){
    return (name1.equalsIgnoreCase(name2));
}
</code></pre>

<p>However, I get an  identifier expected error. I think it would work if I change the parameters but the assignment asks that I use that header. What am I doing wrong?</p>

<p>Here is the name constructor:</p>

<pre><code>public Name (String first, String middle, String last){ 
firstName = first; 
middleName = middle; 
lastName = last; 
}
</code></pre>
