char operator;
int a,b;
operator= '+';
a=6;
b=2;
switch (operator){
case '+': System.out.println(a+b);
case '-':System.out.println(a-b);
case '*':System.out.println(a*b);
break;
case '/':System.o
char operator;
int a,b;
operator= '+';
a=6;
b=2;
switch (operator){
case '+': System.out.println(a+b);
case '-':System.out.println(a-b);
case '*':System.out.println(a*b);
break;
case '/':System.out.println(a/b);
break;
default: System.out.println("无效运算符");}