/** * Created by leon on 1/24/18. */ public class Person { private final String firstName; private final String lastName; public Person(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } @Override public String toString() { return new StringBuilder() .append("\nMy first name is " + firstName) .append("\nMy last name is " + lastName) .toString(); } }