Computer Applications
The method of Scanner class used to accept a double value is:
- nextInt()
- nextDouble()
- next()
- 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
When primitive data type is converted to a corresponding object of its class, it is called:
- Boxing
- Unboxing
- explicit type conversion
- implicit type conversion
The number of bytes occupied by a character array of 10 elements.
- 20 bytes
- 60 bytes
- 40 bytes
- 120 bytes
Among the following which is a keyword:
- every
- all
- case
- each
The output of Math.round(6.6) + Math.ceil(3.4) is:
- 9.0
- 11.0
- 10.0
- 11