KnowledgeBoat Logo
|

Computer Applications

The method of Scanner class used to accept a double value is:

  1. nextInt()
  2. nextDouble()
  3. next()
  4. nextInteger()

Input in Java

ICSE Sp 2024

40 Likes

Answer

nextDouble()

Reason — The nextDouble() function reads the next token entered by the user as a double value.

Answered By

23 Likes


Related Questions