Computer Science, asked by blackpink47, 4 months ago

5. Name the methods of Scanner class that:
i) is used to input an integer data from standard input device.
ii)is used to input a string data from standard input

Answers

Answered by subhojitdas0987
5

Answer:

For class input, it uses nextInt () while for percentage it uses nextFloat ().

Explanation:

Please mark as the brainliest

Answered by Jasleen0599
0

i) is used to input an integer data from standard input device.

nextInt()

ii)is used to input a string data from standard input

nextLine()

  • The device from which input to the system is taken is known as the standard input device, or stdin. In most cases, this is the keyboard, but you can specify that input come from a disc file or a serial port, for instance.
  • The Scanner class's nextInt() method is used to receive integer data from the standard input device.
  • A software reads its input data from a stream known as standard input. The read operation is used by the software to make data transfer requests. Some program don't need stream input.

#SPJ3

Similar questions