, . . , JVM, , . ββ Eclipse. , .
, i + "" i + ",", . , - Eclipse .
String text = "SomeString";
for (int i = 0; i < 15000; i++) {
text = text.concat(i + ",");
}
System.out.println(text);
. !
UPDATE: I tried just printing the long string "xxxxxx" and found that up to 32,000 characters are displayed. When the line goes to 32001, it is not displayed. When I put "12345" + "xxxxxxxxx ...", I could still display 32000 characters of "x", which means the line length is more than 32000, so this has nothing to do with the total length of the line. This seems to be related to the length of the parts of the String objects.
source
share