temp.substring(temp.indexOf(strs[1])) substring的参数是int型,因此必须用indexof,而charat只是定位到某一个字符。 转载于:https://www.cnblogs.com/ilxx1988/archive/2013/02/26/2933261.html