This code wont work for some reason. For example when i input 4+7 it says that it's 108.
import java.util.Scanner; public class myCalculator { public static void main(String[] args) { Scanner Calculator = new Scanner(System.in); System.out.println("Plese input equation. NO DOUBLE DIGITS!"); String calculator = Calculator.next(); char[] op = calculator.toCharArray(); switch(op[1]){ case('+'): double stuff = (op[0] + op[2]); System.out.println(stuff); break; case('-'): double stuff0 = (op[0] - op[2]); System.out.println(stuff0); break; case('*'): double stuff1 = (op[0] * op[2]); System.out.println(stuff1); break; case('/'): double stuff2 = (op[0] / op[2]); System.out.println(stuff2); break; default: System.out.println("ERROR"); } } }