java.lang.StringIndexOutOfBoundsException: 字符数组越界,操作字符串时试图取大于字符串长度的字符。StringIndexOutOfBoundsException: String index out of range: 0这个异常,获取到空值。
解决办法对str增加判断不能为空,逻辑就会往下执行,不再报错
java.lang.StringIndexOutOfBoundsException: 字符数组越界,操作字符串时试图取大于字符串长度的字符。StringIndexOutOfBoundsException: String index out of range: 0这个异常,获取到空值。
解决办法对str增加判断不能为空,逻辑就会往下执行,不再报错