added statement about order of outputs in Java