Advertisement
Guest User

Untitled

a guest
May 29th, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public void displayUnderTime(Song allSongs[]) {
  2. System.out.println("Please enter the time in which you want songs with durations to be displayed under:");
  3. int underTime = console.nextInt();
  4. for (int i = 0;i < database.allSongs.length;i++) {
  5. if (database.allSongs[i] != null) {
  6. if (database.allSongs[i].duration < underTime) {
  7. database.bubbleSort(allSongs);
  8. }
  9. }
  10.  
  11.  
  12. }
  13. for (int i = 0; i < allSongs.length;i++) {
  14. if (allSongs[i] != null) {
  15. System.out.print(allSongs[i].name + " by ");
  16. System.out.println(allSongs[i].artist);
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement