Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void displayUnderTime(Song allSongs[]) {
- System.out.println("Please enter the time in which you want songs with durations to be displayed under:");
- int underTime = console.nextInt();
- for (int i = 0;i < database.allSongs.length;i++) {
- if (database.allSongs[i] != null) {
- if (database.allSongs[i].duration < underTime) {
- database.bubbleSort(allSongs);
- }
- }
- }
- for (int i = 0; i < allSongs.length;i++) {
- if (allSongs[i] != null) {
- System.out.print(allSongs[i].name + " by ");
- System.out.println(allSongs[i].artist);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement