Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do {
- try {
- int input;
- input = sc.nextInt();
- switch (input) {
- case 1:
- player.finish();
- return;
- case 2:
- if (player.activeplaylists.size() != 0) {
- System.out.print("Number of active playlists: " + player.activeplaylists.size() + "\n"
- + "They are: ");
- player.writePlaylists();
- System.out.println("Enter the number:");
- int number = sc.nextInt();
- player.stopPlaylist(number);
- return;
- } else {
- System.out.println("There are no active playlists");
- }
- case 3:
- return;
- default:
- System.out.print("Wrong input!" + "\n");
- break;
- }
- } catch (InputMismatchException ex) {
- System.out.print("Wrong input!");
- ;
- }
- } while (true);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement