Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/stringConcatInLoop/beforeIntroduceStringBuilder.java
2017-02-02 14:29:02 +03:00

17 lines
419 B
Java

// "Introduce new StringBuilder to update variable 's'" "true"
public class Main {
void test(boolean b) {
String s = "";
if (b)
for(int i=0; i<10; i++) {
if(s.indexOf("a") > 0) {
System.out.println(s);
break;
}
s+<caret>=i;
}
s = s.trim();
System.out.println(s);
}
}