how to create class that that has a list in it, and the list should contain two different kind of objects
<p>For example: </p>

<p>I have two type of objects:</p>

<pre><code>public class Image {
...
}
</code></pre>

<p>And</p>

<pre><code>public class Video {
...
}
</code></pre>

<p>I want to have a class that will contain a single list of those two objects, like this:</p>

<pre><code>public class Media {

private List&lt;Object&gt; mediaList = new....
....
}
</code></pre>
