Calling methods on a List object of type Class : <p>I have made a List with the type of a child class. Why can't I call on the methods defined in the child class?</p>

<pre><code>    int desktopID = 0;
    Random randomID = new Random();
    List&lt;MessageHandler&gt; test = null;

    for(int i = 0; i &lt; 1000; i++){
        desktopID = randomID.nextInt(10);
        System.out.println(desktopID);
        test.storeMessage("Message Number: "+ i, desktopID);
    }

    System.out.println(test.getRecentMessage(desktopID).toString());
</code></pre>
