Solved

You Wish to Use the Scanner Class's NextInt() Method to Read

Question 17

Multiple Choice

You wish to use the Scanner class's nextInt() method to read in whole numbers. To avoid exceptions that would occur if the input is not a whole number, you should use the ____ method before calling nextInt.


A) hasNext()
B) hasNextInteger()
C) hasIntegerValue()
D) hasNextInt()

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions