Generally I would not advise using Boolean types as input variables.
They should be used for comparisons. To answer your question, change
the type that reads the exit command to a String perhaps?...