Multiple choice

Which of the following are not the methods of the scanner class object in java?

  1. Next()

  2. nextLine()

  3. nextInt()

  4. nextChar()

  5. nextLong()

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

There is no function defined in Scanner class to take character input. So, there is no function named nextChar(). So, this is the correct answer.