Conclusion
In this article, you saw in practice how to add sounds or music to a game. The game needed very basic sounds, so it was quite easy to implement. The most important factor was the PlayerListener interface, which provides a simple way to keep the music playing while the game was running.
NOTE
The melody used in this article should not be (to my knowledge) from any published musical masterpiece. If it is, however, and the owner of the copyrights is offended, I'm deeply sorry and I can replace it with some other notes.