Can anyone tell me why I always have this strange output after running this loop? Is this a threading issue or what?
for(int i=0;i<10;i++){
System.out.println("out: "+i);
System.err.println("err: "+(i+1));
}
->OUTPUT:
err: 1
out: 0
err: 2
err: 3
err: 4
out: 1
out: 2
out: 3
out: 4
err: 5
out: 5
err: 6
out: 6
err: 7
err: 8
out: 7
out: 8
err: 9
out: 9
err: 10
out: 10