How to reference an instance of another class? : <p>sorry for the stupid question but I really cant solve it myself and can't find a fitting solution.</p>

<p>I have multiple classes: MusicCollection,Albums and Songs. In each is an ArrayList and a bunch of methods to store new albums via a GUI class. Now I built anoter class Playlist with a LinkedList that should be able to get songs from albums .</p>

<p>In the GUI class I create an instance of MusicCollection to add albums and songs and use the methods of these classes. </p>

<p>To add songs to the playlist I create an instance of Playlist in the GUI class. This instance of Playlist needs to have access to the instance of MusicCollection to get its songs. How can I solve this? I tried to make the instance of the MusicCollection public, didn't work, I tried to call it over the getter, didn't work either.</p>

<p>If I make a new instance of MusicCollection within the PlayList Class it's empty of course :-/</p>

<p>Can anybody help me? </p>

<p>Thanks in advance!</p>
