I have the following code
public class Test {
public static void main(String[] args) {
int []n= new int[6000];
for(int i=0;i<6000;i++){
n[i]=1;
}
for(int i=0;i<6000;i++){
System.out.print(n[i]);
}
}
There is no output in the console. However if I decrease the limit for the loop like ,
for(int i=0;i<3000;i++){
System.out.print(n[i]);
}
Now I can see the output. It looks like System.out.print() only prints if all the numbers fit in a single line.
Now how can I print all the numbers which fit in a single line and later go to the next line and print rest of them?