+ 1
More types
how can I enter the choice in char?... it's not working when I did it... https://code.sololearn.com/c1tNXRybs4or/?ref=app
1 Antwort
0
Accept input as String, then grab the first character off the String as a char.
String s = in.readLine();
char op = s.charAt(0);
switch(op)
{
    case '+':
        // code here
        break;
    case '*':
        // code here
        break;
    // more cases here
}
Hth, cmiiw




