Skip to content

Instantly share code, notes, and snippets.

@bandrzejczak
Last active February 9, 2018 21:29
Show Gist options
  • Save bandrzejczak/2d14712e625e0c87de856c1f73e86cf4 to your computer and use it in GitHub Desktop.
Save bandrzejczak/2d14712e625e0c87de856c1f73e86cf4 to your computer and use it in GitHub Desktop.
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