Quite a lot to do with this one.. so Far I have a class that looks like public class Person { private String firstName; private String lastName; public Person() { firstName = ""...
Well, here's something to get you started: "So how would I set the last name only" q[Person person = new Person(); person.setLastName("Smith");]q or q[Person person = new Person(null, "Smi...
Your equals method shouldn't throw an Exception if you pass in null, as this one will.
yes check that the otherPerson is null, and return false if it is. and use .equals on Strings like Ian said, since == is a reference equality in objects (i.e. these two variables point to the same object in memory), but String's equals() does an equality check on the contents of the Object (the internal array of characters that make up the String).