I created a program that runs in a sort of loop, and it stops only if a particular event happens; i forgot to implement the possibility to interrupt the program from "outside", for example typing "halt" in the prompt.
So now i have something like this:
public void main(....) {
instruction1;
instruction2;
while(true) {
if(???)
break;
}
}
And want change it in something like:
main() {
do {
instruction1;
instruction2;
...
...
} while(prompt do not contains 'halt');