Greg Thank you very much for your time and help, I did it finally and I feel soooooo excited...
I see it now and it seems so simple after all... I mean I struggled to find the solution thinking the wrong way and it was so straightforward...
I am a very beginner in Object Oriented Programming but I am really hooked... Its absolutely amazing stuff...
I post the improved method bellow... (just to show my success to somebody)
public void playTrack(int index)
{
if(indexValid(index)) {
Track track = tracks.get(index);
if(TrackIsNotPlaying) {
player.startPlaying(track.getFilename());
track.incrementCount();
TrackIsNotPlaying = false;
System.out.println("Now playing: " + track.getArtist() + " - " + track.getTitle());
}
else {
stopPlaying();
player.startPlaying(track.getFilename());
System.out.println("Now playing: " + track.getArtist() + " - " + track.getTitle());
}
}
}
And I really appreciate the fact that you didnt just write the code and send it to me but you explained how to do it by my self...