if (firstName == null && lastName == null) { throw new IllegalArgumentException("Both names cannot be null"); } this.firstName = firstName; this.lastName = lastName;
return this.firstName;
String first = (this.firstName != null) ? this.firstName : "?"; String last = (this.lastName != null) ? this.lastName : "?"; return first + " " + last;
return this.lastName;