【摘要】:例子:public class STR {public void method {String string = s + "d"// violation.string = "abc" + "d" // violation. }}更正:将一个字符的字符串替换成''public class STR {public void method {String string = s + 'd'string = "abc" + 'd' }}
例子:
public class STR {
public void method(String s) {
String string = s + "d" // violation.
string = "abc" + "d" // violation.
}
}
更正:
将一个字符的字符串替换成''
public class STR {
public void method(String s) {
String string = s + 'd'
string = "abc" + 'd'
}
}
免责声明:以上内容源自网络,版权归原作者所有,如有侵犯您的原创版权请告知,我们将尽快删除相关内容。