diff options
author | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-06-25 18:27:54 +0200 |
---|---|---|
committer | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-06-25 18:27:54 +0200 |
commit | c61ce2e94a1be121414670f93987abdd29d389c6 (patch) | |
tree | 241fc9d0cfbfee93d345af198f71db45d0e4bd08 /src | |
parent | b0429d97568a66266d77cbcc5da712352791af25 (diff) |
Fixing STZ-0004 issue.
Diffstat (limited to 'src')
-rw-r--r-- | src/musichub/main/Main.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/musichub/main/Main.java b/src/musichub/main/Main.java index f917b01..b72a95b 100644 --- a/src/musichub/main/Main.java +++ b/src/musichub/main/Main.java @@ -20,8 +20,10 @@ public class Main { if (choice.length() == 0) System.exit(0); - while (choice.charAt(0) != 'q') { + while (!choice.equals("")) { //if the user puts nothing, quit the loop/system switch (choice.charAt(0)) { + case 'q': //added the option directly in the switch instead of the loop + System.exit(0); case 'h': printAvailableCommands(); choice = scan.nextLine(); |