Can somebody explain me why this code does not print the numbers?
String text = new String("SomeString");
for (int i=0; i<1500; i++) {
text = text.concat(i+"");
}
System.out.println(text);
Result
SomeString
If I lower the number of runs to 1000 it works, why?! And also if I add not only a number but also a character, it works.
Ok New Update:
Thanks for the code examples. I tried them all but what I found out is, that the console
actually display the numbers but only in fontcolor white. But the first part of the String
SomeString
is black.
I use jdk1.7.0_06 !
This is eclipse bug. Fixed width console fixes the output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With