I'm programming Java using Eclipse and I discovered a weird behavior of System.out.print when printing long arrays. Using the following code prints a long line of blanks before the actual output:
double[] values = new double[1000];
for (int i=0; i<1000; i++)
values[i] = Math.random();
for (int i=0; i<1000; i++)
System.out.print(values[i] + " ");
But when I change the array length to 100 it works as expected:
Can someone explain this? Is it related to Java or to Eclipse?