Respuesta :

int whatever = scnr.nextInt();



Although usually when a class has a next* member function, it usually needs to check that there IS a next, that you haven't reached the end. Without knowing the class that scnr was instantiated from, I can't guess.