Last active
February 9, 2018 21:29
-
-
Save bandrzejczak/2d14712e625e0c87de856c1f73e86cf4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Integer getSongLength( | |
Artist artist, | |
String albumName, | |
String songName) { | |
Album album = artist.getAlbum(albumName); | |
if (album != null) { | |
Song song = album.getSong(songName); | |
if (song != null) { | |
return song.getLength(); | |
} else { | |
return null; | |
} | |
} else { | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment