判断一个字符是否为运算字符,怎么判断啊?用if就红了,这里标红了
参考:
String str = "+"; if(str.equals("+")){ ... } 或者 char ch = '+'; if(ch=='+'){ ... }
加一个转义符 \