I am evaluating user inputs as commands for my application. If the user presses Q, or q, and then hits enter, the application quits and execution terminate
Don't forget that if you perform a System.exit()
, you can't easily later use your methods in a standalone library. If you want to reuse your code outside your existing solution (and you may not now, but decide to do so in the future), then you'll then have to revisit and refactor appropriately.
Otherwise the worst-case scenario is that you take the existing code without noticing the System.exit()
s, use it and then have your library exit unexpectedly in a new application.
Just something to bear in mind re. code-reuse.