why do u have to have a buffer after nextline java 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();