Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/stringConcatInLoop/beforeIntroduceStringBuilder.java
T

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);
}
}