java scanner system.in cler code example
Example: java clear bufffer to take next string inpuit
if(!input.hasNext() || !input.hasNextInt()) {
input.next();
continue;
}
int cmd = input.next();
if(!input.hasNext() || !input.hasNextInt()) {
input.next();
continue;
}
int cmd = input.next();