posted 8 years ago
I have the following recursive code which returns a y or n.
When I enter incorrect data the error message (line 5) sometimes prints before, sometimes after and sometimes on the same line as the prompt message (line 2 after the recursive call on line 6). If I use System.out instead of System.err it works fine. My understanding is I should use System.err for an error message so can someone explain what is going on here? Thanks!