here is the if that checks what happens to the scanner.hasNextInt():
if (scanner.hasNextInt()){ System.out.println("we"); }