Java 8 - List Results are Printing Not Actual Content : <p>Using Java 8, I was checking out some of its new features...</p>

<p>Created the following class:</p>

<pre><code>public class Person {

    String name;
    int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
</code></pre>

<p>Created the PersonApp class:</p>

<pre><code>import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import static java.util.Comparator.comparing;

public class PersonApp {

    public static void printSorted(List&lt;Person&gt; people, Comparator&lt;Person&gt; comparator) {
        people.stream()
              .sorted(comparator)
              .forEach(System.out::println);
    }

    public static void main(String[] args) {
        List&lt;Person&gt; people = new ArrayList&lt;&gt;();

        people.add(new Person("Sara", 12));
        people.add(new Person("Mark", 43));
        people.add(new Person("Bob", 12));
        people.add(new Person("Jill", 64));

        printSorted(people, comparing(Person::getAge).thenComparing(Person::getName));
    }
}
</code></pre>

<p>When I run this class, I get the following instead of the values I wanted to see:</p>

<pre><code>Person@682a0b20
Person@3d075dc0
Person@214c265e
Person@448139f0
</code></pre>

<p>What am I possibly doing wrong?</p>
