KnowledgeBoat Logo
|

Computer Applications

Which of the following statements is true for nextDouble( )?

  1. It accepts an integer type value
  2. It accepts a double type value
  3. It accepts a float type value
  4. It accepts a long type value

Input in Java

10 Likes

Answer

It accepts a double type value

Reason — nextDouble( ) method receives a double type value and stores it in a double type variable.

Answered By

4 Likes


Related Questions