很容易这样写就可以了int(5+8+9-8/9);如果数字也是字符串,那的先把数字转化成整形eginti=(int)(5);这个问题很好解决使用praseInt方法就可以了eg把字符串str=10转化成整形strInt=10intstrInt=parseInt.Integer(str);