diff --git a/Taschenrechner.java b/Taschenrechner.java index 1cd9d6c..0506fe5 100644 --- a/Taschenrechner.java +++ b/Taschenrechner.java @@ -66,14 +66,18 @@ public class Taschenrechner { int s = scan.nextInt(); + scan.close(); + switch (s) { case 1: { addition(s, s); + break; } case 2: { division(s, s); + break; } default: throw new IllegalArgumentException("Unexpected value: " + s);