My println() prints the same line twice for no apparent reason. Why?

If I divide by zero, my calculator is supposed to print a line and terminate the program. However, it prints it twice and only then stops running

I’m at my wits’ end trying to think of the reason for such an unusual behavior. Could you give me a hint, please?

In case you need the entire code, it’s here (it’s too big to paste here, I think)

Yay! I’ve found what the problem is! (take a look at the line that commented out) :tada:

P.S.: Consider answering another question of mine about the DecimalFormat.format() method showing an unusual behavior!