Comparing names given method header? v2
<p>Well, the other question was pretty old and I figured it was unlikely more people were gonna stumble upon it and read/answer it so here goes: 
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 (otherName.equalsIgnoreCase(this));
    }
</code></pre>

<p>as suggested by someone in the previous thread.</p>

<p>However, I am getting a cannot find symbol error. </p>

<p>Here is the rest of my code to be nitpicked. Forgive me for its sloppiness and whatnot, I'm not coding well at all tonight. </p>

<p>Name.java:</p>

<pre><code>public class Name{
    private String firstName;
    private String middleName;
    private String lastName;

    public Name (String first, String middle, String last){
        firstName = first;
        middleName = middle;
        lastName = last;
    }

    public String getFirst(){
    return firstName;
    }

    public String getMiddle(){
        return middleName;
    }

    public String getLast(){
        return lastName;
    }

    public String firstMiddleLast(){
        return (firstName + middleName + lastName);
    }

    public String lastFirstMiddle(){
        return (lastName + ", " + middleName + firstName);      
    }

    public boolean equals(Name otherName){
        return (otherName.equalsIgnoreCase(this));
    }

    public String initials(){
        String initials = firstName.substring(0,1) + middleName.substring(0,1) + lastName.substring(0,1);
        initials.toUpperCase();
        return initials; 
    }

    public int length(){
        int sum = firstName.length() + middleName.length() + lastName.length();
        return sum;
    }
}
</code></pre>

<p>TestingNames.java:</p>

<pre><code>import java.util.Scanner;

public class TestNames{
    public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    System.out.println("Enter the first name, middle name, and last name in that order for the first name object.");
    Name name = new Name(scan.next(), scan.next(), scan.next());
    System.out.println("Enter the second name, middle name, and last name in that order for the first name object.");
    Name name2 = new Name(scan.next(), scan.next(), scan.next());   

    System.out.println("Printing name in the order first name, middle name, last name");
    System.out.println(name.firstMiddleLast());
    System.out.println(name2.firstMiddleLast());

    System.out.println("Printing name in the order last name, first name, middle name");
    System.out.println(name.lastFirstMiddle());
    System.out.println(name2.lastFirstMiddle());

    System.out.println("Printing initials");
    System.out.println(name.initials());
    System.out.println(name2.initials());

    System.out.println("Printing name length");
    System.out.println(name.length());
    System.out.println(name2.length());

    System.out.println("Are these names equal?");
    System.out.println(name.equals(name2));



    }
}
</code></pre>
